A C++, header-only library for constructing JSON and JSON-like data formats, with JSON Pointer, JSON Patch, JSON Schema, JSONPath, JMESPath, CSV, MessagePack, CBOR, BSON, UBJSON
And here is how Python csvkit's utility in2csv does this conversion:
(base) C:\Users\Wiluite50>in2csv testjson_nested.json
text,float,datetime,boolean,nested/time,nested/nested/date,nested/nested/integer
Chicago Reader,1.0,1971-01-01T04:14:00,True,4:14:00,1971-01-01,40
Chicago Sun-Times,1.27,1948-01-01T14:57:13,True,14:57:13,1948-01-01,63
I've even seen a C++ code that did it as well (except for saving field ordering, what is very important to be).
But, the jsoncons seems to be perfectly designed and quick, and it would be nice to have the same thing within it.
Suppose, we have this source (testjson_nested.json):
And here is how Python csvkit's utility in2csv does this conversion:
I've even seen a C++ code that did it as well (except for saving field ordering, what is very important to be). But, the jsoncons seems to be perfectly designed and quick, and it would be nice to have the same thing within it.
Originally posted by @wiluite in https://github.com/danielaparker/jsoncons/discussions/555#discussioncomment-11333899