Baptiste Lepilleur
b96aed0f3e
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).
2010-12-24 19:30:06 +00:00
Baptiste Lepilleur
fa130ef871
- 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
2010-12-24 12:47:14 +00:00
Baptiste Lepilleur
7469f1d014
JsonCpp is now licensed under MIT license, or public domain if desired and recognized in your jurisdiction.
2010-04-20 21:35:19 +00:00
Baptiste Lepilleur
201fb2cf0d
- Moved definition of Json::Int and Json::UInt to config.h which compiler detection logic to define them to 64 bits integer if JSON_NO_INT64 is not defined.
...
- Added Json::ArrayIndex as an unsigned int to forwards.h
- Modified Json::Value to consistently use Json::ArrayIndex.
- Added int/unsigned int constructor overload to Json::Value to avoid ambiguous constructor call.
- Modified jsontestrunner/main.cpp to use Json::valueToString for Value::asInt() conversion to string.
- Modified Json::Reader to only overflow to double when the number is too large (previous code relied on the fact that an int fitted in a double without precision loss).
- Generalized uintToString() helpers and buffer size to automatically adapt to the precision of Json::UInt.
- Added specific conversion logic for UInt to double conversion on Microsoft Visual Studio 6 which only support __int64 to double conversion (unsigned __int64 conversion is not supported)
- Added test for 64 bits parsing/writing. Notes: those will fail when compiled with JSON_NO_INT64 (more dev required to adapt).
2010-04-19 07:37:41 +00:00
Baptiste Lepilleur
afd9cef928
Removed experimental ValueAllocator, it caused static initialization/destruction order issues (bug #2934500 ). The DefaultValueAllocator has been inlined in code.
2010-03-13 13:10:27 +00:00
Baptiste Lepilleur
3a1b93be1c
- added Int/UInt typedef in Json namespace. Modified Value::Int and Value::UInt to be typedef on those. Modified code to use Json::Int instead of Value::Int.
...
- added Value constructor taking begin/end pointer to initialize the Value with a non-zero terminated string.
2010-02-21 14:08:17 +00:00
Christopher Dunn
8f5ddcfa8d
Added cstring for memcpy(), as suggested by sebastien.vincent@turnserver.org . This allows gcc-4 to compile. Removed doxygen from SConstruct, since it is now broken; I have been unable to get it to work with either scons 0.97 or scons 2.1; hopefully someone else can get that working again.
2009-05-11 20:04:10 +00:00
Christopher Dunn
b2f720456e
Added prop svn:eol-style native. Stripped carriage-returns on unix. Hopefully, this will work for Windows too now.
2007-06-13 15:48:30 +00:00
Christopher Dunn
a44cffb342
Fixed compilation warnings. Added -Wall to linux-gcc compilation. JSON_ASSERT_MESSAGE now throws exception (but JSON_ASSERT does not).
2007-05-09 19:35:15 +00:00
Christopher Dunn
208a781e47
Added empty() operator-bang and isNull()
2007-03-23 08:55:25 +00:00
Christopher Dunn
1aa20f9e58
Added removeMember() and altered a few comments.
2007-03-23 08:30:20 +00:00
Christopher Dunn
0c498695a7
fixed compiler warning
2007-03-23 07:16:59 +00:00
Christopher Dunn
ca21256395
setComment() will assert if comment does not start with / (or if it were NULL, which would have seg-faulted before).
2007-03-23 07:05:19 +00:00
Christopher Dunn
3ffbf208a0
Fixed gcc 2.95.3 problem. Bug: 1570919
2007-03-23 04:55:07 +00:00
Baptiste Lepilleur
4cd8bae331
- reorganized repository to match standard layout
2007-03-15 22:11:38 +00:00