Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add templated function to YamlWriter for supporting compact format #134

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

LuciaEchevarria99
Copy link
Contributor

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 function set(Yaml& yml, const TagType& tag, const T& value) has been renamed to set_in_tag(Yaml& yml, const TagType& tag, const T& value).

Signed-off-by: Lucia Echevarria <luciaechevarria@eprosima.com>
@codecov-commenter
Copy link

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 37.86%. Comparing base (4b19122) to head (fb385e3).

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #134      +/-   ##
==========================================
+ Coverage   36.53%   37.86%   +1.33%     
==========================================
  Files         169      152      -17     
  Lines       11542     6956    -4586     
  Branches     5277     2764    -2513     
==========================================
- Hits         4217     2634    -1583     
+ Misses       4581     2937    -1644     
+ Partials     2744     1385    -1359     
Flag Coverage Δ
37.86% <100.00%> (+1.34%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants