Open michaeleisel opened 5 years ago
How about using kParseInsituFlag
?
that provides a nice performance boost, and it is my current preferred way, but it is destructive and potentially less performant than this. however, the length would need to be figured out before the malloc, i wonder if that will cause the speedup not to be that great.
When I make parsers on top of the RapidJSON SAX parser to convert json into objects of a certain language, I find that I always need to copy the RapidJSON string into my own allocated buffer that I can pass to the language's native string constructor for it to own and later free. What I would prefer is for RapidJSON to copy directly into an allocated buffer, either one that I allocate or one that it allocates. This is more efficient and is nondestructive. Thoughts?