Skip to content

Fix deserialization of empty strings #489

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

Merged
merged 1 commit into from
Jan 20, 2025
Merged

Conversation

biojppm
Copy link
Owner

@biojppm biojppm commented Jan 11, 2025

Fixes #480

  • Deserializing an empty quoted string will not cause an error.
  • Deserializing an empty string will cause an error.
  • Ensure keys are deserialized using all the rules applying to vals.
  • Added KEYNIL and VALNIL to NodeType_e, used by the parser to mark the key or val as empty. This changed the values of the NodeType_e enumeration.

@biojppm biojppm force-pushed the fix/480_read_squoted branch from 32cda18 to e29771c Compare January 18, 2025 16:56
Copy link

codecov bot commented Jan 18, 2025

Codecov Report

Attention: Patch coverage is 99.34211% with 1 line in your changes missing coverage. Please review.

Project coverage is 97.30%. Comparing base (83595d0) to head (8b988dd).
Report is 51 commits behind head on master.

Files with missing lines Patch % Lines
src/c4/yml/parse_engine.def.hpp 98.14% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master     #489      +/-   ##
==========================================
+ Coverage   97.27%   97.30%   +0.02%     
==========================================
  Files          34       34              
  Lines       11285    11322      +37     
==========================================
+ Hits        10978    11017      +39     
+ Misses        307      305       -2     

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

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@biojppm biojppm force-pushed the fix/480_read_squoted branch 2 times, most recently from dc481d1 to 75dfe1a Compare January 18, 2025 18:18
@biojppm biojppm changed the title re #480 : allow deserialization of empty strings Fix deserialization of empty strings Jan 18, 2025
@biojppm biojppm force-pushed the fix/480_read_squoted branch 5 times, most recently from dabb6af to b8cdc8f Compare January 19, 2025 19:12
  - Deserializing an empty quoted string *will not* cause an error. Previously, this was causing an error.
  - Deserializing an empty string *will* cause an error.
  - Ensure keys are deserialized using all the rules applying to vals: add readkey() analogs to read().
  - Added `KEYNIL` and `VALNIL` to `NodeType_e`, used by the parser to mark the key or val as empty. This changed the values of the `NodeType_e` enumeration.
  - Added `NodeType::key_is_null()` and `NodeType::val_is_null()`.
@biojppm biojppm force-pushed the fix/480_read_squoted branch from b8cdc8f to 8b988dd Compare January 19, 2025 19:14
@biojppm biojppm merged commit d4457b9 into master Jan 20, 2025
252 of 255 checks passed
@biojppm biojppm deleted the fix/480_read_squoted branch January 20, 2025 07:24
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.

Deserializing an empty string should not throw
1 participant