Christopher Dunn
3b3540d9ef
bug#2407932: strpbrk() could fail for NULL pointer.
2011-06-22 21:04:41 +00:00
Christopher Dunn
c9f91dd929
More missing constructor initializers found by Coverity.
2011-06-21 23:02:06 +00:00
Baptiste Lepilleur
eadc478e50
Fixed typo: amalga*ma*te. Replaced macro JSON_IS_AMALGATED with JSON_IS_AMALGAMATION
2011-05-02 21:09:30 +00:00
Baptiste Lepilleur
e3cc0f004b
Untabified some sources
2011-05-02 18:41:01 +00:00
Baptiste Lepilleur
d0a9f3d98d
Bug #3200841 : removed "warning C4127: conditional expression is constant" concerning infinite loop by replacing while (true) with for (;;).
2011-05-02 09:54:49 +00:00
Baptiste Lepilleur
64e40aafe5
Added support for amalgated source and header generation (a la sqlite). Refer to README.txt section "Generating amalgated source and header" for detail.
...
The amalgated sources are generated by concatenating JsonCpp source in the correct order and defining macro JSON_IS_AMALGATED to prevent inclusion of other headers. Sources and header has been modified to prevent any inclusion when this macro is defined.
The script amalgate.py handle the generation.
2011-05-01 20:13:40 +00:00
Baptiste Lepilleur
842e9ac54b
Major rework of 64 integer support: 64 bits integer are only returned when explicitly request via Json::Value::asInt64(), unlike previous implementation where Json::Value::asInt() returned a 64 bits integer.
...
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.
2010-12-27 17:45:23 +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
d38ba2a2cb
- extracted some utility functions out-of reader and parser.
2010-03-13 12:24:38 +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
Malay Shah
617270bfaa
Fixing string index issue when checking for control characters
2009-11-18 17:40:22 +00:00
Baptiste Lepilleur
eda47b61b5
Fixed bug introduced by utf-8 patch with fix provided by Henry Ludemann. All unit tests are now passing.
2009-11-18 17:01:09 +00:00
Baptiste Lepilleur
b0ab79bc5b
Added patch for mingw from Sebastien Vincent
2009-11-15 22:49:54 +00:00
Malay Shah
ee4b4dab54
Implementing support for reading and writing Unicode escape sequences.
2009-11-13 04:21:14 +00:00
Christopher Dunn
2083c9e3bf
Forgot to add # to %g modifier for sprintf in valueToString for floats. Otherwise no decimal point appears when only zeroes would follow, which changes the type to integer.
2008-01-24 20:21:11 +00:00
Christopher Dunn
ed971e180e
Changed valueToString for floats so that zeroes after a decimal are truncated -- saves file size esp. for StyledStreamWriter which uses tabs instead of spaces.
2008-01-24 20:09:48 +00:00
Baptiste Lepilleur
e1aad35ae5
Fixed compilation issue on windows (avoid using cstring and use string.h instead).
2008-01-20 16:55:26 +00:00
Christopher Dunn
9f8abcb258
Indentation is not perfect, but pretty good. Not sure how to perfect, given the difficulty of testing the last char written.
2007-06-13 17:02:01 +00:00
Christopher Dunn
605cd7e902
Added StyledStreamWriter, which has no reason to derive from Writer, since its write() method does cannot return a string and must take a stream.
2007-06-13 15:55:50 +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
f153eaaed0
Fixed 2.95.3 header probs
2007-03-23 10:19:49 +00:00
Christopher Dunn
56a1d6cbf5
Added istream/ostream funcs/operators
2007-03-23 09:57:01 +00:00
Christopher Dunn
5674738668
[1611376]by reserving the max string-size when escaped chars exist, we should save some runtime.
2007-03-23 06:12:28 +00:00
Christopher Dunn
ce1f32981b
[1611376]writer now escapes special characters. When no special chars are present, old behavior is retained. New method might have a performance penalty b/c of operator new inside std::string. (This would not exist if the whole thing operated on ostream instead, I think.)
2007-03-23 05:56:39 +00:00
Baptiste Lepilleur
2d4dd281f1
- Made FastWriter output more compact.
...
- fixed bug in runjsontests.py script.
2007-03-17 22:14:59 +00:00
Baptiste Lepilleur
4cd8bae331
- reorganized repository to match standard layout
2007-03-15 22:11:38 +00:00