A new decoding
was added for decoding buffers with length. The most important thing
is that the input buffer need not be null terminated. In the future,
it may also help to implement the support for zero bytes inside
except that it takes an additional length argument:
value = json_loadb(buffer, length, 0, &error);
This version also introduces two new decoding flags and one new encoding flag:
JSON_REJECT_DUPLICATES: Issue a decoding error if any JSON object in the input contins duplicate keys.
JSON_DISABLE_EOF_CHECK: Stop decoding after a valid JSON input. This allows other data after the JSON data.
JSON_ENCODE_ANY: Allow encoding any JSON value. Without this flag, only arrays and objects can be encoded as the root value.
- Fix a memory leak when memory allocation fails in json_object_set() and friends.
strtod()for better portability (MINGW in this case).
- Avoid set-but-not-used warning/error when building with the newest GCC.