azadkuh / gason--

an efficient JSon parser and builder in plain C++
Other
25 stars 12 forks source link

Possible to pass length to jsonParse()? #6

Open websocket98765 opened 6 years ago

websocket98765 commented 6 years ago

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 commented 6 years ago

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