This PR adds a couple of files "json_write.h" and "json_write.cpp" with a single API function:
// Returns the number of characters that are written to the buffer (including the null character)
// You can call this function with buffer=nullptr to query the memory you need to allocate
// If your buffer is not big enough, the function writes until runs out of space,
// and returns the number of characters that would have been written if the buffer was big enough
size_t jsonWrite(const JsonValue& val, size_t bufferSize, char* buffer, char* indentor = "\t");
I added a small test to the test suite.
Since I worked with VisualStudio I also added support for it in the CMake (I had to update the CMake version to use the new CMAKE_CXX_STANDARD config variable).
Hello,
This PR adds a couple of files "json_write.h" and "json_write.cpp" with a single API function:
I added a small test to the test suite.
Since I worked with VisualStudio I also added support for it in the CMake (I had to update the CMake version to use the new CMAKE_CXX_STANDARD config variable).
Thanks!