simdjson
simdjson copied to clipboard
Support for building json?
Hey
1st of all, thanks for the one file h/cpp lib & basic docs, love it! Great read/easy to use.
Its not much of an issue as more of a question... but can simdjson actually create jsons from "scratch" that then I could get raw string from/serialize etc etc?
Say
dom::element item;
item["val"]=312312;
item[10]="312312;
item["data"] = dom::element();
item["data"]["someData"]="wow";
etc,etc ? Or is simdjson only used to read json's and not create them for usage/etc?
Regards Dariusz
The DOM tree in simdjson is immutable. Thus simdjson cannot really be used for serialization... building DOM and writing out JSON.
Up until simdjson 1.0, it is considered a non-goal to be able to use simdjson for building JSON trees, see https://github.com/simdjson/simdjson/issues/503
We may revisit this after release 1.0, but it is basically in the far future for us.
Of course, if brave folks want to contribute, that could change the direction.
Hey
I see, so its very fast reader and for writing, I need to use a different library o.O
This is going to be fun :- )
Thank you!
Yeah, fast writing is something we think about, but we kinda want to get it right. There are some things we want to understand about the read scenario before we go there.
But as noted, contributions are absolutely accepted :)
I jumped right into this project thinking it could do writing. So +1 for supporting this.