46 Commits

Author SHA1 Message Date
Sam Clegg
63860617b3 Add copyright information to .py files
This change adds explicit copyright information too python
files files.  The copyright year used in each case is the
date of the first git commit of each file.

The goal is to allow jsoncpp to be integrated into the
chromium source tree which requires license information in
each source file.

fixes #234
2015-04-09 18:05:47 -07:00
Christopher Dunn
9e4bcf354f test BuiltStyledStreamWriter too 2015-01-25 15:54:40 -06:00
Christopher Dunn
494950a63d rm extra whitespace in python, per PEP8 2015-01-24 16:21:12 -06:00
Christopher Dunn
8d15e51228 add test_comment_00
one-element array with comment, for issue #103
2015-01-23 14:28:21 -06:00
Christopher Dunn
70704b9a70 test both StyledWriter and StyledStreamWriter 2015-01-23 13:36:10 -06:00
Christopher Dunn
ac6bbbc739 show cmd in runjsontests.py 2015-01-23 13:36:10 -06:00
Christopher Dunn
26c52861b9 pass --json-writer StyledWriter 2015-01-23 13:36:10 -06:00
Christopher Dunn
c407f1407f test-data for #103
passes
2015-01-20 15:16:46 -06:00
Christopher Dunn
37644abd77 test comment before several types
* array
* double
* string
* true
* false
* null
2015-01-20 12:23:18 -06:00
Christopher Dunn
94b0297dc5 Revert "consider these as binary, so git will not alter line-endings"
This reverts commit 8f3aa220dbab931bfd5a32bdb7d7e77c785c1796.

We will find a better fix for #116. In the meantime, we want to see
diffs for changes to test-data.
2015-01-20 12:06:12 -06:00
Christopher Dunn
8f3aa220db consider these as binary, so git will not alter line-endings
issue #116
2015-01-16 16:29:07 -06:00
Christopher Dunn
4bc311503c just in case 2015-01-16 14:53:04 -06:00
Christopher Dunn
cd140b5141 py2 and py3 2015-01-16 14:52:56 -06:00
datadiode
01aee4a0dc Fix Python test scripts for Python 3 and Windows 2015-01-16 09:57:42 -06:00
Christopher Dunn
d98b5f4230 quote spaces in commands for Windows
See comments at:
    1a4dc3a888
2015-01-09 22:32:10 -06:00
Christopher Dunn
4ca9d25ccc Revert "Merge pull request #108 from open-source-parsers/quote-spaces"
This reverts commit dfc5f879c168d11fe2f4ef686ab33bbecdc5679f, reversing
changes made to 0f6884f771eae221873b345af2c6369ccf7dcb5b.
2015-01-09 22:28:20 -06:00
Christopher Dunn
1a4dc3a888 quote cmdline arg
See #99.
2015-01-06 12:11:12 -06:00
Christopher Dunn
bd1e895287 simple py3 changes 2014-11-19 23:30:47 -06:00
Christopher Dunn
9aa6144b2a python except as 2014-11-19 23:10:02 -06:00
Cory Quammen
fd06bfca79 Removed unneeded newlines from parsed comments
Newlines from comments separated by lines are retained when comments
are appended, so adding a newline between separate comments for a
node is not needed.
2014-10-09 16:33:29 -04:00
Cory Quammen
4d23492d11 Added printing of comments to *.actual test files
This enables testing of comment-handling code. Updated *.expected test
result files to account for printing of comments.
2014-10-09 16:33:29 -04:00
Christopher Dunn
09439b7bc7 Comment reading/write improvements
This patch fixes some aspects of reading and writing comments:
- Multiple C++-style comments before a Json value had extra newlines appended to them. This patch removes the addition of those newlines.
- Comments written before Json values in the StyledWriter were not indented to match the indentation level of the value. This patch adds indentation to comments.
- Fixed inconsistency in newlines following C- and C++-style comments being saved as part of the comment. All newlines at the end of a comment are now removed.
- Added an additional test of comments.

https://sourceforge.net/p/jsoncpp/patches/25/
2014-04-19 21:19:24 +00:00
Christopher Dunn
468564b3fe More eol changes. 2011-06-21 21:53:02 +00:00
Christopher Dunn
dc0f736f59 Switched CRLF to LF in repo, and added svn:eol-style native. I might have missed a few files though. Just committing what I have so far. 2011-06-21 21:18:49 +00:00
Aaron Jacobs
4b819c2309 Added a few test cases that Google is using internally for patches made
in the past.
2011-05-26 06:58:14 +00:00
Aaron Jacobs
ae9ffb5443 Fixed a parsing bug in decodeNumber, updating the failing test cases to be
correct in the process. (The test cases incorrectly used exact integers instead
of scientific notation.)
2011-05-24 03:59:24 +00:00
Aaron Jacobs
e656c5fa2d Added some test cases that catch a parsing bug. 2011-05-24 03:19:50 +00:00
Baptiste Lepilleur
9c98f2277b Fixed bug #3139677: JSON [1 2 3] was incorrectly parsed as [1, 3]. Error is now correctly detected.
Modified runjsontests.py to allow test that expect failure in jsoncpp test suite.
2011-05-01 15:40:47 +00:00
Baptiste Lepilleur
402c13eb3d - added unit test and roadmap for handling of escape sequence "\/" 2010-04-27 16:37:50 +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
7c66ac2e0f - added command-line option --with-json-checker to run test from jsonchecker test suite of json.org. 2010-02-21 14:26:08 +00:00
Baptiste Lepilleur
7a866553bb - added a large test that cause(d?) crash with experimental JSON_VALUE_USE_INTERNAL_MAP 2010-02-21 10:44:12 +00:00
Baptiste Lepilleur
89c0092084 renamed jsontestrunner.py to pyjsontestrunner.py to avoid confusion 2010-02-19 05:10:41 +00:00
Baptiste Lepilleur
a894f775bb - fixed failing test 2010-02-19 05:09:54 +00:00
Baptiste Lepilleur
2bcfb63362 Added another failing unicode test case 2009-11-26 10:52:18 +00:00
Baptiste Lepilleur
7dec64f57e Moved jsontestrunner data from test/ to test/data. 2009-11-21 18:20:25 +00:00
Baptiste Lepilleur
45c499d310 - added mini unit testing framework
- added unit tests for Value.isXYZ() and iteration over Value members to compute size
2009-11-21 18:07:09 +00:00
Baptiste Lepilleur
932cfc798b Added support for valgrind memory checks 2009-11-19 20:16:59 +00:00
Baptiste Lepilleur
f179a180bd Fixed comment after value in object value signaled by Frederic Surleau. 2009-11-18 22:25:34 +00:00
Baptiste Lepilleur
8868147835 - added Features class that describes allowed extension for Reader, to allow for strict configuration
- added tests from json.org jsonchecker and modified jsontestrunner to use strict parsing mode when executing them
2009-11-18 21:38:54 +00:00
Baptiste Lepilleur
64e07e54ed - fixed SCons build on Windows: only build static library (support static/dynamic at the same time requires significant changes)
- renamed SCons glob tool to globtool to avoid clash with python glob module. This prevented running the tests.
- check target now works with SCons 1.x
2009-11-18 21:27:06 +00:00
Malay Shah
ee4b4dab54 Implementing support for reading and writing Unicode escape sequences. 2009-11-13 04:21:14 +00:00
Baptiste Lepilleur
230b1f675f - Added basic string test (all char in ASCII range 33-126) and a large string test. 2008-09-26 07:15:11 +00:00
Christopher Dunn
f986423955 Stripped carriage return and added eol-style native prop. 2007-06-14 21:01:26 +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