Closed iboB closed 7 years ago
As discussed before here: https://github.com/chadaustin/sajson/issues/13
Currently the only way to get a string value is to risk an allocation (since it's gotten by std::string as_string()). With null termination there is a safe way to get it as const char* with no allocations needed
std::string as_string()
const char*
Thank you! I applied minor API tweaks to make it clear this is treating a JSON string as a nul-terminated C string.
As discussed before here: https://github.com/chadaustin/sajson/issues/13
Currently the only way to get a string value is to risk an allocation (since it's gotten by
std::string as_string()
). With null termination there is a safe way to get it asconst char*
with no allocations needed