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

[C++] JSON serialization #718

Closed
ksergey opened this issue Sep 13, 2019 · 5 comments
Closed

[C++] JSON serialization #718

ksergey opened this issue Sep 13, 2019 · 5 comments

Comments

@ksergey
Copy link
Contributor

ksergey commented Sep 13, 2019

Hello SBE devs!

SBE codec is not escapes characters reserved by JSON during serialization.
It produces invalid JSON in cases when symbols like " present in text fields.

Thanks

@mjpt777
Copy link
Contributor

mjpt777 commented Sep 13, 2019

This is not something we make use of. Feel free to send a PR to address it.

@rigtorp
Copy link
Contributor

rigtorp commented Oct 4, 2019

There is no builtin JSON serialization in the C++ codecs is there?

@ksergey
Copy link
Contributor Author

ksergey commented Oct 8, 2019

@rigtorp there is JSON-like serialization. Serialization code don't escape JSON control chars in strings.

@ksergey
Copy link
Contributor Author

ksergey commented Oct 8, 2019

I think better solution to have something like exists in rapidjson library:
https://rapidjson.org/md_doc_sax.html#Reader

mjpt777 added a commit that referenced this issue Oct 14, 2019
…d use it pretty printing plus give a summary of raw binary data rather than trying to print. Issue #718.
@mjpt777
Copy link
Contributor

mjpt777 commented Oct 14, 2019

I've pushed a change which will Json escape var data strings in UTF-8 or ASCII will is a subset and this is use for the pretty printing. Raw binary will be summarised as "x bytes of raw data".

@mjpt777 mjpt777 closed this as completed Oct 16, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants