-
I'm looking for ideas about how to pre-parse a json file which contains variable callouts in the format
What I think would be nice is if I could pre-parse the file line-by-line and feed it into the json parser, but there doesn't seem to be a way to do that. I'd have to read the entire file into a modified string, stringstream, or temp file and then feed it to the json parser. Thanks for your time |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 3 replies
-
Sounds like you want an input adapter. https://github.com/nlohmann/json/blob/develop/include/nlohmann/detail/input/input_adapters.hpp |
Beta Was this translation helpful? Give feedback.
Sounds like you want an input adapter. https://github.com/nlohmann/json/blob/develop/include/nlohmann/detail/input/input_adapters.hpp
wide_string_input_adapter
is an example of converting text between when it's read from the underlying adapter and when it's provided to the parser.