mirror of
https://github.com/open-source-parsers/jsoncpp.git
synced 2025-02-25 07:41:07 +01:00

This eases porting portable code and does not break compatibility with the previous release. Json::Value::asLargestInt() has also be added to ease writing portable code independent of 64 bits integer support. It is typically used to implement writers.
77 lines
3.0 KiB
Plaintext
77 lines
3.0 KiB
Plaintext
New in JsonCpp 0.6.0:
|
|
---------------------
|
|
|
|
* Compilation
|
|
|
|
- LD_LIBRARY_PATH and LIBRARY_PATH environment variables are now propagated to the build
|
|
environment as this is required for some compiler installation.
|
|
|
|
- Added support for Microsoft Visual Studio 2008 (bug #2930462):
|
|
The platform "msvc90" has been added.
|
|
|
|
Notes: you need to setup the environment by running vcvars32.bat
|
|
(e.g. MSVC 2008 command prompt in start menu) before running scons.
|
|
|
|
* Value
|
|
|
|
- Removed experimental ValueAllocator, it caused static
|
|
initialization/destruction order issues (bug #2934500).
|
|
The DefaultValueAllocator has been inlined in code.
|
|
|
|
- Added support for 64 bits integer:
|
|
|
|
Types Json::Int64 and Json::UInt64 have been added. They are aliased
|
|
to 64 bits integers on system that support them (based on __int64 on
|
|
Microsoft Visual Studio platform, and long long on other platforms).
|
|
|
|
Types Json::LargestInt and Json::LargestUInt have been added. They are
|
|
aliased to the largest integer type supported:
|
|
either Json::Int/Json::UInt or Json::Int64/Json::UInt64 respectively.
|
|
|
|
Json::Value::asInt() and Json::Value::asUInt() still returns plain
|
|
"int" based types, but asserts if an attempt is made to retrieve
|
|
a 64 bits value that can not represented as the return type.
|
|
|
|
Json::Value::asInt64() and Json::Value::asUInt64() have been added
|
|
to obtain the 64 bits integer value.
|
|
|
|
Json::Value::asLargestInt() and Json::Value::asLargestUInt() returns
|
|
the integer as a LargestInt/LargestUInt respectively. Those functions
|
|
functions are typically used when implementing writer.
|
|
|
|
The reader attempts to read number as 64 bits integer, and fall back
|
|
to reading a double if the number is not in the range of 64 bits
|
|
integer.
|
|
|
|
Warning: Json::Value::asInt() and Json::Value::asUInt() now returns
|
|
long long. This changes break code that was passing the return value
|
|
to *printf() function.
|
|
|
|
Support for 64 bits integer can be disabled by defining the macro
|
|
JSON_NO_INT64 (uncomment it in json/config.h for example), though
|
|
it should have no impact on existing usage.
|
|
|
|
- The type Json::ArrayIndex is used for indexes of a JSON value array. It
|
|
is an unsigned int (typically 32 bits).
|
|
|
|
- Array index can be passed as int to operator[], allowing use of literal:
|
|
Json::Value array;
|
|
array.append( 1234 );
|
|
int value = array[0].asInt(); // did not compile previously
|
|
|
|
- Added float Json::Value::asFloat() to obtain a floating point value as a
|
|
float (avoid lost of precision warning caused by used of asDouble()
|
|
to initialize a float).
|
|
|
|
* Tests
|
|
|
|
- Added test to ensure that the escape sequence "\/" is corrected handled
|
|
by the parser.
|
|
|
|
* License
|
|
|
|
- See file LICENSE for details. Basically JsonCpp is now licensed under
|
|
MIT license, or public domain if desired and recognized in your jurisdiction.
|
|
Thanks to Stephan G. Beal [http://wanderinghorse.net/home/stephan/]) who
|
|
helped figuring out the solution to the public domain issue.
|