[21812 ] Add templated function to YamlWriter for supporting compact format #134
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR adds support for two YAML serialization formats (compact and extended) and includes the following key changes:
Addition of new templated function
set(Yaml& yml, const T& value, const bool is_compact)
is added to support writing values into YAML in either compact or extended format, based on the is_compact flag.The functionality has also been applied to
set_collection
, allowing collections vectors to be serialized in both compact and extended formats.Renaming of set with
TagType
: The functionset(Yaml& yml, const TagType& tag, const T& value)
has been renamed toset_in_tag(Yaml& yml, const TagType& tag, const T& value)
.