Skip to content

RFC 8259 Validation & Compliance #159

Closed Answered by mwalcott3
CrazyKidJack asked this question in Q&A
Discussion options

You must be logged in to vote

Validation and conformance updates were made in #156.

Writing should be 100% compliant and reading should be 100% compliant when using the force_conformance option. We cant guarantee this but we have added a bunch of new conformance tests and any conformance issue reported will be treated as a bug.

A validate_json convivence function was added

std::string fail10 = R"({"Extra value after close": true} "misplaced quoted value")";
assert(glz::validate_json(fail10) != glz::error_code::none);

This essentially just calls glz::read<glz::opts{.force_conformance = true}> on the input buffer with a glz::skip

My personal opinions on spec conformance:

  • Writing out invalid JSON is not acceptable unles…

Replies: 3 comments 1 reply

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
1 reply
@stephenberry
Comment options

Comment options

You must be logged in to vote
0 replies
Answer selected by mwalcott3
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants