yyjson doesn't use the allocator set during document creation by default when using the yyjson_mut_write function, instead allocating the result string through malloc (causing the string to be leaked), but we now use the advanced version taking options (such as which allocator to use) to make sure the resulting string is allocated by the arena. Additionally we also avoid copying the resulting json string to the vector string heap buffer now as we can just point into the arena instead, saving some memory.
yyjson doesn't use the allocator set during document creation by default when using the
yyjson_mut_write
function, instead allocating the result string through malloc (causing the string to be leaked), but we now use the advanced version taking options (such as which allocator to use) to make sure the resulting string is allocated by the arena. Additionally we also avoid copying the resulting json string to the vector string heap buffer now as we can just point into the arena instead, saving some memory.Closes #371