fkYAML version 0.4.0
Summary
This release adds new features: parsing multi-line plain scalars & reverse iterations over sequence/mapping node elements.
See the related pull requests and documentations for more details.
A number of bugs (mostly in the deserialization feature) have also been resolved.
Note that a breaking change has been made in the way of error handling when deserializing an int or float scalar fail. The library now emits no error on such a scalar and treats it as a string scalar instead.
What's Changed
💥 Breaking Changes
- Stop throwing parse_error on string-to-int/float conversion failures if not forced with tag (#431, @fktn-k)
- reported by @tomwpid in the issue #428
- The library used to throw a
fkyaml::parse_error
upon conversion failures from a scalar to an integer or floating point value while parsing a YAML like this:id: 6E-578 # "6E-578" is interpreted as a floating point value but not expressible as a `double` # --> `fkyaml::parse_error` gets thrown due to the conversion failure.
- Such a conversion failure is now internally recovered by treating the scalar as a string scalar instead.
✨ New Features
- Support parsing multiline plain scalars (#432, @fktn-k)
- Parsing a YAML which contains multi-line plain (unquoted) scalars are now supported.
foo: this is a multi-line plain scalar # interpreted as "this is a multi-line plain scalar"
- Parsing a YAML which contains multi-line plain (unquoted) scalars are now supported.
- Support reverse iterations over sequence/mapping nodes (#440, @fktn-k)
- You can now iterate over sequence/mapping elements in a reversed order like this:
// node is [1, 2, 3] for (auto rit = node.rbegin(); rit != node.rend(); ++rit) { std::cout << *rit << std::endl; } // output: // 3 // 2 // 1
- You can now iterate over sequence/mapping elements in a reversed order like this:
⚡ Improvements
- Resolve the C4800 warning when compiled with MSVC (#430, @fktn-k)
- Make node iterators compatible with different value type const-ness (#438, @fktn-k)
fkyaml::node::iterator
andfkyaml::node::const_iterator
are compatible in constructions, assignments and comparisons.
🐛 Bug Fixes
- Emit error if an anchor is specified to an alias (#434, @fktn-k)
- Fixed bugs in parsing block scalars (#435, @fktn-k)
- Fix parsing input which begins with a newline & indentation (#437, @fktn-k)
- Fix round-trip issue in float serialization using scientific notation (#439, @fktn-k)
🤖 CI
- Update GitHub Actions workflow jobs using macOS related runner images (#433, @fktn-k)
- Add more GCC & Clang versions to use in GitHub Actions workflows (#436, @fktn-k)