Repository navigation
Add rfl::json::Raw for passthrough raw JSON subtrees - #67
Open
clockblocker wants to merge 2 commits into
Open
clockblocker wants to merge 2 commits into
clockblocker wants to merge 2 commits into
Conversation
This was referenced Nov 27, 2026
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
Refs munich-data-engineering#368 (addresses the JSON-RPC passthrough
params/result/datause case without converting throughrfl::Generic).Adds
rfl::json::Rawso structs parsed/written withrfl::jsoncan carry arbitrary unparsed JSON subtrees verbatim without converting through intermediaterfl::GenericDOM trees.Changes
include/rfl/json/Raw.hpp(included viainclude/rfl/json.hpp):rfl::json::Rawholding a raw JSON string (default-initialized to"null"), with constructors fromstd::string,std::string_view,const char*, accessors (str(),value(),c_str(),empty()), defaultedoperator==, andfrom_json_objusingyyjson_val_writewith RAIIstd::freecleanup.rfl::parsing::Parser<json::Reader, json::Writer, json::Raw, ProcessorsType>specialization supporting root values, struct fields,std::optional,std::vector,std::map, andrfl::json::to_schema.include/rfl/json/Writer.hpp&src/rfl/json/Writer.cpp:raw_as_root,add_raw_to_array, andadd_raw_to_objectusingyyjson_mut_rawncpy(falling back toyyjson_mut_nullif empty).tests/json/test_raw.cpp:missing,null, present), vectors/maps, verbatim passthrough without re-parsing,rfl::json::pretty, andrfl::json::to_schema.Verification
-Wall -Werror) and ranctest: 589/589 tests pass (including all 7 newjson.test_raw_*tests).