Baptiste Lepilleur | 130730f | 2010-03-13 11:14:49 +0000 | [diff] [blame] | 1 | New in JsonCpp 0.6.0: |
| 2 | --------------------- |
| 3 | |
| 4 | * Compilation |
| 5 | |
Baptiste Lepilleur | 99043b3 | 2011-05-01 15:47:38 +0000 | [diff] [blame] | 6 | - LD_LIBRARY_PATH and LIBRARY_PATH environment variables are now |
| 7 | propagated to the build environment as this is required for some |
| 8 | compiler installation. |
Baptiste Lepilleur | 130730f | 2010-03-13 11:14:49 +0000 | [diff] [blame] | 9 | |
| 10 | - Added support for Microsoft Visual Studio 2008 (bug #2930462): |
| 11 | The platform "msvc90" has been added. |
| 12 | |
| 13 | Notes: you need to setup the environment by running vcvars32.bat |
| 14 | (e.g. MSVC 2008 command prompt in start menu) before running scons. |
| 15 | |
Baptiste Lepilleur | 64e40aa | 2011-05-01 20:13:40 +0000 | [diff] [blame] | 16 | - Added support for amalgated source and header generation (a la sqlite). |
| 17 | Refer to README.txt section "Generating amalgated source and header" |
| 18 | for detail. |
| 19 | |
Baptiste Lepilleur | afd9cef | 2010-03-13 13:10:27 +0000 | [diff] [blame] | 20 | * Value |
| 21 | |
| 22 | - Removed experimental ValueAllocator, it caused static |
| 23 | initialization/destruction order issues (bug #2934500). |
| 24 | The DefaultValueAllocator has been inlined in code. |
| 25 | |
Baptiste Lepilleur | 842e9ac | 2010-12-27 17:45:23 +0000 | [diff] [blame] | 26 | - Added support for 64 bits integer: |
| 27 | |
| 28 | Types Json::Int64 and Json::UInt64 have been added. They are aliased |
| 29 | to 64 bits integers on system that support them (based on __int64 on |
| 30 | Microsoft Visual Studio platform, and long long on other platforms). |
| 31 | |
| 32 | Types Json::LargestInt and Json::LargestUInt have been added. They are |
| 33 | aliased to the largest integer type supported: |
| 34 | either Json::Int/Json::UInt or Json::Int64/Json::UInt64 respectively. |
| 35 | |
| 36 | Json::Value::asInt() and Json::Value::asUInt() still returns plain |
| 37 | "int" based types, but asserts if an attempt is made to retrieve |
| 38 | a 64 bits value that can not represented as the return type. |
| 39 | |
| 40 | Json::Value::asInt64() and Json::Value::asUInt64() have been added |
| 41 | to obtain the 64 bits integer value. |
| 42 | |
| 43 | Json::Value::asLargestInt() and Json::Value::asLargestUInt() returns |
| 44 | the integer as a LargestInt/LargestUInt respectively. Those functions |
| 45 | functions are typically used when implementing writer. |
| 46 | |
| 47 | The reader attempts to read number as 64 bits integer, and fall back |
| 48 | to reading a double if the number is not in the range of 64 bits |
| 49 | integer. |
Baptiste Lepilleur | 201fb2c | 2010-04-19 07:37:41 +0000 | [diff] [blame] | 50 | |
| 51 | Warning: Json::Value::asInt() and Json::Value::asUInt() now returns |
| 52 | long long. This changes break code that was passing the return value |
| 53 | to *printf() function. |
Baptiste Lepilleur | 842e9ac | 2010-12-27 17:45:23 +0000 | [diff] [blame] | 54 | |
| 55 | Support for 64 bits integer can be disabled by defining the macro |
| 56 | JSON_NO_INT64 (uncomment it in json/config.h for example), though |
| 57 | it should have no impact on existing usage. |
Baptiste Lepilleur | 201fb2c | 2010-04-19 07:37:41 +0000 | [diff] [blame] | 58 | |
| 59 | - The type Json::ArrayIndex is used for indexes of a JSON value array. It |
| 60 | is an unsigned int (typically 32 bits). |
Baptiste Lepilleur | fa130ef | 2010-12-24 12:47:14 +0000 | [diff] [blame] | 61 | |
| 62 | - Array index can be passed as int to operator[], allowing use of literal: |
| 63 | Json::Value array; |
| 64 | array.append( 1234 ); |
| 65 | int value = array[0].asInt(); // did not compile previously |
Baptiste Lepilleur | 7469f1d | 2010-04-20 21:35:19 +0000 | [diff] [blame] | 66 | |
Baptiste Lepilleur | b96aed0 | 2010-12-24 19:30:06 +0000 | [diff] [blame] | 67 | - Added float Json::Value::asFloat() to obtain a floating point value as a |
| 68 | float (avoid lost of precision warning caused by used of asDouble() |
| 69 | to initialize a float). |
| 70 | |
Baptiste Lepilleur | b2e8ccc | 2011-05-01 16:27:55 +0000 | [diff] [blame] | 71 | * Reader |
| 72 | |
| 73 | - Renamed Reader::getFormatedErrorMessages() to getFormattedErrorMessages. |
| 74 | Bug #3023708 (Formatted has 2 't'). The old member function is deprecated |
| 75 | but still present for backward compatibility. |
| 76 | |
Baptiste Lepilleur | e6046e5 | 2010-04-27 16:38:30 +0000 | [diff] [blame] | 77 | * Tests |
| 78 | |
| 79 | - Added test to ensure that the escape sequence "\/" is corrected handled |
| 80 | by the parser. |
| 81 | |
Baptiste Lepilleur | 9c98f22 | 2011-05-01 15:40:47 +0000 | [diff] [blame] | 82 | * Bug fixes |
| 83 | |
Baptiste Lepilleur | 99043b3 | 2011-05-01 15:47:38 +0000 | [diff] [blame] | 84 | - Bug #3139677: JSON [1 2 3] was incorrectly parsed as [1, 3]. Error is now |
| 85 | correctly detected. |
| 86 | |
| 87 | - Bug #3139678: stack buffer overflow when parsing a double with a |
| 88 | length of 32 characters. |
Baptiste Lepilleur | fb17080 | 2011-05-02 16:53:10 +0000 | [diff] [blame] | 89 | |
| 90 | - Fixed Value::operator <= implementation (had the semantic of operator >=). |
| 91 | Found when addigin unit tests for comparison operators. |
Baptiste Lepilleur | b2e8ccc | 2011-05-01 16:27:55 +0000 | [diff] [blame] | 92 | |
Baptiste Lepilleur | 1837a1c | 2011-05-02 20:11:48 +0000 | [diff] [blame^] | 93 | - Value::compare() is now const and has an actual implementation with |
| 94 | unit tests. |
| 95 | |
Baptiste Lepilleur | 7469f1d | 2010-04-20 21:35:19 +0000 | [diff] [blame] | 96 | * License |
| 97 | |
| 98 | - See file LICENSE for details. Basically JsonCpp is now licensed under |
| 99 | MIT license, or public domain if desired and recognized in your jurisdiction. |
Baptiste Lepilleur | e6046e5 | 2010-04-27 16:38:30 +0000 | [diff] [blame] | 100 | Thanks to Stephan G. Beal [http://wanderinghorse.net/home/stephan/]) who |
| 101 | helped figuring out the solution to the public domain issue. |