Repository navigation
Add first-class rfl::json read and write flag constants - #80
Open
clockblocker wants to merge 3 commits into
Open
clockblocker wants to merge 3 commits into
clockblocker wants to merge 3 commits into
Conversation
This was referenced Nov 27, 2026
clockblocker
force-pushed
the
json-flags
branch
from
November 27, 2026 20:14
c62ebdb to
7f6df28
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds idiomatic
inline constexprread and write flag constants underrfl::jsonalongside the existingrfl::json::prettyso consumers no longer need to leak raw CYYJSON_*macros for JSONC, JSON5, 2-space pretty-printing, BOM handling, or inf/nan formatting.Read Flags (
include/rfl/json/read.hpp,yyjson_read_flag)stop_when_done,allow_trailing_commas,allow_comments,read_allow_inf_and_nan,read_allow_invalid_unicode,allow_bom,allow_ext_number,allow_ext_escape,allow_ext_whitespace,allow_single_quoted_str,allow_unquoted_keyjsonc = allow_comments | allow_trailing_commas,json5 = YYJSON_READ_JSON5YYJSON_READ_INSITU,YYJSON_READ_NUMBER_AS_RAW,YYJSON_READ_BIGNUM_AS_RAW).Write Flags (
include/rfl/json/write.hpp,yyjson_write_flag)pretty(existing),pretty_two_spaces,escape_unicode,escape_slashes,write_allow_inf_and_nan,inf_and_nan_as_null,write_allow_invalid_unicode,newline_at_endallow_inf_and_nan,allow_invalid_unicode) are explicitly disambiguated withread_/write_prefixes.Verification
-Wall -Werror: 331/331 PASSED (including 13 new tests intests/json/test_json_flags.cpp).docs/content/supported_formats/json.md.