Skip to content

YAML support - #168

Merged
kunitoki merged 3 commits into
mainfrom
dev/yaml
Aug 12, 2026
Merged

YAML support#168
kunitoki merged 3 commits into
mainfrom
dev/yaml

Conversation

@kunitoki

Copy link
Copy Markdown
Owner

This pull request introduces a new YAML parsing and writing feature to the core library, adds supporting documentation, and includes minor enhancements to character handling utilities. The main addition is the YAML class, which provides a comprehensive, self-contained YAML <-> var converter with support for common YAML features, and integrates it into the core API and documentation. Additionally, new character utility methods are added to improve ASCII and control character detection, and a small improvement is made to JSON formatting.

YAML Support and API Integration:

  • Added a new YAML class in yup_YAML.h and implementation, providing static methods for parsing and writing YAML to and from var objects, with support for core-schema type resolution, block/flow collections, block scalars, anchors/aliases/merge keys, and formatting options (parse, fromString, toString, writeToStream, FormatOptions).
  • Integrated the new YAML API into the core library headers and build (yup_core.h, yup_core.cpp) and test infrastructure (tests/yup_core.cpp). [1] [2] [3]

Documentation:

  • Documented the new YAML class and its API in docs/core/data-interchange.md, including usage examples and feature notes.
  • Added a changelog entry highlighting the new YAML support.

Character Utilities:

  • Added new methods to CharacterFunctions: isAsciiPrintable and isControlCharacter, and used isAsciiPrintable to improve ASCII output in the JSON formatter. [1] [2] [3]

Build/Include Improvements:

  • Included additional standard headers (<charconv>, <limits>) to support the new YAML parser implementation.

These changes collectively add robust YAML support to the library, improve interoperability, and enhance character handling for serialization and parsing tasks.

@codecov

codecov Bot commented Aug 12, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 87.22359% with 156 lines in your changes missing coverage. Please review.
✅ Project coverage is 80.60%. Comparing base (a2620ed) to head (451ead0).

Files with missing lines Patch % Lines
modules/yup_core/yaml/yup_YAML.cpp 87.08% 156 Missing ⚠️
Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main     #168      +/-   ##
==========================================
+ Coverage   80.47%   80.60%   +0.12%     
==========================================
  Files         775      777       +2     
  Lines       79059    80278    +1219     
==========================================
+ Hits        63623    64705    +1082     
- Misses      15436    15573     +137     
Files with missing lines Coverage Δ
modules/yup_core/javascript/yup_JSON.cpp 94.32% <100.00%> (+3.87%) ⬆️
modules/yup_core/text/yup_CharacterFunctions.cpp 100.00% <100.00%> (ø)
modules/yup_core/text/yup_CharacterFunctions.h 98.74% <ø> (ø)
modules/yup_core/yaml/yup_YAML.h 100.00% <100.00%> (ø)
modules/yup_core/yup_core.cpp 100.00% <ø> (ø)
modules/yup_core/yaml/yup_YAML.cpp 87.08% <87.08%> (ø)

... and 3 files with indirect coverage changes


Continue to review full report in Codecov by Harness.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update a2620ed...451ead0. Read the comment docs.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@kunitoki
kunitoki merged commit 3167a0c into main Aug 12, 2026
4 checks passed
@kunitoki
kunitoki deleted the dev/yaml branch August 12, 2026 13:42
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.

1 participant