Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for building json? #821

Open
Dariusz1989 opened this issue Apr 27, 2020 · 4 comments
Open

Support for building json? #821

Dariusz1989 opened this issue Apr 27, 2020 · 4 comments
Labels
enhancement New feature or request

Comments

@Dariusz1989
Copy link

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

@lemire
Copy link
Member

lemire commented Apr 27, 2020

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 #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.

@Dariusz1989
Copy link
Author

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!

@jkeiser
Copy link
Member

jkeiser commented Apr 27, 2020

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 :)

@jkeiser jkeiser changed the title simdjson usage beyond parsing... Support for building json? Apr 27, 2020
@jkeiser jkeiser added the enhancement New feature or request label Apr 27, 2020
@lemire lemire added this to the Post 1.0 milestone Aug 3, 2020
@lemire lemire modified the milestones: Post 2.0, 2.0 Aug 19, 2020
@dan-ryan
Copy link

I jumped right into this project thinking it could do writing. So +1 for supporting this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

4 participants