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

[enhancement] allow to emit pre-generated JSON #205

Closed
sandr8 opened this issue Nov 25, 2014 · 0 comments
Closed

[enhancement] allow to emit pre-generated JSON #205

sandr8 opened this issue Nov 25, 2014 · 0 comments
Milestone

Comments

@sandr8
Copy link

sandr8 commented Nov 25, 2014

It would be nice to add a special event in SAX mode that allows to interleave pre-generated JSON with JSON generated dynamically. This could prove very useful in caching common sub-parts of JSON output. The interface could be as following, since in JSON null bytes have to be escaped:

bool Writer::RawValue(const char *null_terminated_json)

It could also be possible to add a "raw" type of value in the DOM representation, although I myself wouldn't care much about it, and it would pose interesting questions w.r.t. things like its lifecycle and whether the usual move semantics should apply or rather some copy-on-write mechanism or what not... I'm not a fan of caching subtrees of the DOM, but I'd really love to be able to cache work in when emitting JSON via SAX events.

@miloyip miloyip added this to the v1.1 Beta milestone Apr 24, 2015
miloyip added a commit that referenced this issue Feb 14, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants