Home | History | Annotate | Download | only in jsoncpp
      1 New in SVN
      2 ----------
      3 
      4  *  Updated the type system's behavior, in order to better support backwards
      5     compatibility with code that was written before 64-bit integer support was
      6     introduced. Here's how it works now:
      7 
      8      *  isInt, isInt64, isUInt, and isUInt64 return true if and only if the
      9         value can be exactly represented as that type. In particular, a value
     10         constructed with a double like 17.0 will now return true for all of
     11         these methods.
     12 
     13      *  isDouble and isFloat now return true for all numeric values, since all
     14         numeric values can be converted to a double or float without
     15         truncation. Note however that the conversion may not be exact -- for
     16         example, doubles cannot exactly represent all integers above 2^53 + 1.
     17 
     18      *  isBool, isNull, isString, isArray, and isObject now return true if and
     19         only if the value is of that type.
     20 
     21      *  isConvertibleTo(fooValue) indicates that it is safe to call asFoo.
     22         (For each type foo, isFoo always implies isConvertibleTo(fooValue).)
     23         asFoo returns an approximate or exact representation as appropriate.
     24         For example, a double value may be truncated when asInt is called.
     25 
     26      *  For backwards compatibility with old code, isConvertibleTo(intValue)
     27         may return false even if type() == intValue. This is because the value
     28         may have been constructed with a 64-bit integer larger than maxInt,
     29         and calling asInt() would cause an exception. If you're writing new
     30         code, use isInt64 to find out whether the value is exactly
     31         representable using an Int64, or asDouble() combined with minInt64 and
     32         maxInt64 to figure out whether it is approximately representable.
     33 
     34 * Value
     35   - Patch #10: BOOST_FOREACH compatibility. Made Json::iterator more 
     36     standard compliant, added missing iterator_category and value_type 
     37 	typedefs (contribued by Robert A. Iannucci).
     38 		
     39 * Compilation
     40 
     41   - New CMake based build system. Based in part on contribution from
     42     Igor Okulist and Damien Buhl (Patch #14).
     43     
     44   - New header json/version.h now contains version number macros
     45     (JSONCPP_VERSION_MAJOR, JSONCPP_VERSION_MINOR, JSONCPP_VERSION_PATCH
     46     and JSONCPP_VERSION_HEXA).
     47 
     48   - Patch #11: added missing JSON_API on some classes causing link issues
     49     when building as a dynamic library on Windows 
     50 	(contributed by Francis Bolduc).
     51     
     52   - Visual Studio DLL: suppressed warning "C4251: <data member>: <type> 
     53     needs to have dll-interface to be used by..." via pragma push/pop
     54     in json-cpp headers.
     55     
     56   - Added Travis CI intregration: https://travis-ci.org/blep/jsoncpp-mirror
     57 		
     58 * Bug fixes
     59   - Patch #15: Copy constructor does not initialize allocated_ for stringValue
     60     (contributed by rmongia).
     61 
     62   - Patch #16: Missing field copy in Json::Value::iterator causing infinite 
     63     loop when using experimental internal map (#define JSON_VALUE_USE_INTERNAL_MAP)
     64 	(contributed by Ming-Lin Kao).
     65 		
     66 
     67   New in JsonCpp 0.6.0:
     68   ---------------------
     69 
     70 * Compilation
     71 
     72   - LD_LIBRARY_PATH and LIBRARY_PATH environment variables are now 
     73     propagated to the build environment as this is required for some 
     74     compiler installation.
     75 
     76   - Added support for Microsoft Visual Studio 2008 (bug #2930462): 
     77     The platform "msvc90" has been added.
     78 
     79     Notes: you need to setup the environment by running vcvars32.bat 
     80     (e.g. MSVC 2008 command prompt in start menu) before running scons.
     81     
     82   - Added support for amalgamated source and header generation (a la sqlite).
     83     Refer to README.txt section "Generating amalgamated source and header"
     84     for detail.
     85     
     86 * Value
     87 
     88   - Removed experimental ValueAllocator, it caused static 
     89     initialization/destruction order issues (bug #2934500). 
     90     The DefaultValueAllocator has been inlined in code.
     91     
     92   - Added support for 64 bits integer:
     93   
     94     Types Json::Int64 and Json::UInt64 have been added. They are aliased
     95 	to 64 bits integers on system that support them (based on __int64 on 
     96 	Microsoft Visual Studio platform, and long long on other platforms).
     97 	
     98 	Types Json::LargestInt and Json::LargestUInt have been added. They are
     99 	aliased to the largest integer type supported: 
    100 	either Json::Int/Json::UInt or Json::Int64/Json::UInt64 respectively.
    101 	
    102 	Json::Value::asInt() and Json::Value::asUInt() still returns plain
    103 	"int" based types, but asserts if an attempt is made to retrieve
    104 	a 64 bits value that can not represented as the return type.
    105 	
    106 	Json::Value::asInt64() and Json::Value::asUInt64() have been added
    107 	to obtain the 64 bits integer value.
    108 	
    109 	Json::Value::asLargestInt() and Json::Value::asLargestUInt() returns
    110 	the integer as a LargestInt/LargestUInt respectively. Those functions
    111 	functions are typically used when implementing writer.
    112 	
    113 	The reader attempts to read number as 64 bits integer, and fall back
    114 	to reading a double if the number is not in the range of 64 bits 
    115 	integer.
    116     
    117     Warning: Json::Value::asInt() and Json::Value::asUInt() now returns
    118     long long. This changes break code that was passing the return value
    119     to *printf() function.
    120   
    121     Support for 64 bits integer can be disabled by defining the macro 
    122 	JSON_NO_INT64 (uncomment it in json/config.h for example), though
    123 	it should have no impact on existing usage.
    124     
    125   - The type Json::ArrayIndex is used for indexes of a JSON value array. It
    126     is an unsigned int (typically 32 bits).
    127 	
    128   - Array index can be passed as int to operator[], allowing use of literal:
    129     Json::Value array;
    130 	array.append( 1234 );
    131 	int value = array[0].asInt();  // did not compile previously
    132 
    133   - Added float Json::Value::asFloat() to obtain a floating point value as a
    134     float (avoid lost of precision warning caused by used of asDouble() 
    135     to initialize a float).
    136 
    137 * Reader
    138 
    139   - Renamed Reader::getFormatedErrorMessages() to getFormattedErrorMessages.
    140     Bug #3023708 (Formatted has 2 't'). The old member function is deprecated
    141     but still present for backward compatibility.
    142     
    143 * Tests
    144 
    145   - Added test to ensure that the escape sequence "\/" is corrected handled 
    146     by the parser.
    147 
    148 * Bug fixes
    149 
    150   - Bug #3139677: JSON [1 2 3] was incorrectly parsed as [1, 3]. Error is now 
    151     correctly detected.
    152     
    153   - Bug #3139678: stack buffer overflow when parsing a double with a
    154     length of 32 characters.
    155 	
    156   - Fixed Value::operator <= implementation (had the semantic of operator >=).
    157     Found when adding unit tests for comparison operators.
    158     
    159   - Value::compare() is now const and has an actual implementation with
    160     unit tests.
    161 
    162   - Bug #2407932: strpbrk() can fail for NULL pointer.
    163 
    164   - Bug #3306345: Fixed minor typo in Path::resolve().
    165 
    166   - Bug #3314841/#3306896: errors in amalgamate.py
    167 
    168   - Fixed some Coverity warnings and line-endings.
    169     
    170 * License
    171   
    172   - See file LICENSE for details. Basically JsonCpp is now licensed under 
    173     MIT license, or public domain if desired and recognized in your jurisdiction.
    174     Thanks to Stephan G. Beal [http://wanderinghorse.net/home/stephan/]) who
    175 	helped figuring out the solution to the public domain issue.
    176