Skip to content

Commit

Permalink
Implement additional serialization methods added in abstractions (#25)
Browse files Browse the repository at this point in the history
* Implement additional serialization method WriteAnyValue and parse method GetRawValue introduced in abstractions
  • Loading branch information
rkodev authored Sep 26, 2022
1 parent 1a109fb commit 84187c2
Show file tree
Hide file tree
Showing 7 changed files with 47 additions and 0 deletions.
8 changes: 8 additions & 0 deletions .idea/.gitignore

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 9 additions & 0 deletions .idea/kiota-serialization-text-go.iml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 8 additions & 0 deletions .idea/modules.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions .idea/vcs.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,12 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

### Changed

## [0.6.0] - 2022-09-22

### Added

- Implement additional serialization method `WriteAnyValues` and parse method `GetRawValue` introduced in abstractions.

## [0.5.0] - 2022-09-02

### Added
Expand Down
5 changes: 5 additions & 0 deletions text_parse_node.go
Original file line number Diff line number Diff line change
Expand Up @@ -243,3 +243,8 @@ func (n *TextParseNode) GetByteArrayValue() ([]byte, error) {
}
return base64.StdEncoding.DecodeString(*s)
}

// GetRawValue returns a ByteArray value from the nodes.
func (n *TextParseNode) GetRawValue() (interface{}, error) {
return n.value, nil
}
5 changes: 5 additions & 0 deletions text_serialization_writer.go
Original file line number Diff line number Diff line change
Expand Up @@ -241,6 +241,11 @@ func (w *TextSerializationWriter) WriteAdditionalData(value map[string]interface
return NoStructuredDataError
}

// WriteAnyValue an unknown value as a parameter.
func (w *TextSerializationWriter) WriteAnyValue(key string, value interface{}) error {
return NoStructuredDataError
}

// Close clears the internal buffer.
func (w *TextSerializationWriter) Close() error {
return nil
Expand Down

0 comments on commit 84187c2

Please sign in to comment.