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

Possible to pass length to jsonParse()? #6

Open
websocket98765 opened this issue Aug 15, 2018 · 1 comment
Open

Possible to pass length to jsonParse()? #6

websocket98765 opened this issue Aug 15, 2018 · 1 comment

Comments

@websocket98765
Copy link

websocket98765 commented Aug 15, 2018

Is there any way to accept both the char* AND length parameters into jsonParse()? For example, this is possible with rapidjson:

rapidjson::Document d;
d.Parse(json, length);

I'm looking to do this because I'm using a char* that is not null terminated from uWebsockets, but it does provide a length. If I add a null terminator (\0) to uWebsocket's char*, then uWebsockets has fatal issues after some time so I can't do this.

@websocket98765
Copy link
Author

FWIW, I have gason-- working in basic tests and like it much better than gason! You wrote a really intuitive API to access elements.

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

1 participant