Christopher Dunn
5031a59518
doxygen changed
2014-07-09 11:48:27 -07:00
Christopher Dunn
5850b83a5b
moved roadmap to wiki
2014-07-09 11:48:26 -07:00
Christopher Dunn
9dd7eea945
fix doxybuild.py paths
2014-07-09 11:48:26 -07:00
Christopher Dunn
35bea41bc9
update docs for github
2014-07-09 11:48:26 -07:00
Christopher Dunn
542cd1d3f5
remove some sourceforge links
2014-07-09 11:48:26 -07:00
Christopher Dunn
ba50403414
ignore doxygen stuff
2014-07-09 11:48:26 -07:00
Christopher Dunn
0db9d6ea01
Merge pull request #7 from cdunn2001/fix-locale
...
Use std::stringstream instead of snprintf() for double->string conversion
2014-07-09 11:47:48 -07:00
Steffen Kieß
b8aaa03367
Use std::stringstream instead of snprintf() for double->string conversion
...
`snprintf()` will use the current `LC_NUMERIC` locale
for converting a double to a string,
which will use a `,` instead of a `.` in some locales (e.g. de_DE).
`std::stringstream` allows setting the locale to `"C"` to always get a `.`.
This occurs only for that `stringstream` instance; no global is
altered.
2014-07-09 11:46:00 -07:00
Christopher Dunn
06dcb1fc89
cmake updates this
2014-07-08 21:57:12 -07:00
Christopher Dunn
973de3988b
Merge pull request #1 from cdunn2001/patch-renu555
...
dead-code patch by renu555
2014-07-05 19:10:34 -07:00
renu555
41b79398a3
Always true condition.
...
for (int index = 0; index < size && !isMultiLine; ++index)
In addition to dead code, in the above if condition checking to !isMultiLine is of no use as it will be always true and hence "for" depends only on condition [index < size.]
The mentioned test case works fine in this case also.
2014-07-05 19:05:41 -07:00
renu555
66b77384d8
Fix dead code scenario.
...
Changes explained
2014-07-05 19:05:41 -07:00
renu555
17c244e644
Fixing unreachable condition.
...
if (!isMultiLine) at line 563 suggests that isMultiline is 0 when if takes true branch. So the condition && at line 571 will always be false.
Also at line 568 !isMultiline in loop conditional check suggests that it depends only on one condition i.e. index <size because !isMultiline is always true.
Hence , it seems logical mistake at line 571 of using && instead of ||
2014-07-05 19:05:41 -07:00
Christopher Dunn
8050d8b677
Merge pull request #6 from cdunn2001/fix-static-init
...
I will try to pull the other changes from Chromium as well.
This passed Travis.
2014-07-05 17:39:19 -07:00
Christopher Dunn
28836b8acc
fix bug for static init
...
Ugh! Static initialization of instance variables is a very bad idea.
This fix is taken from the Chromium code-base. It includes their
double-fix for ARM.
* https://codereview.chromium.org/24984004
* https://src.chromium.org/viewvc/chrome?revision=226099&view=revision
* https://code.google.com/p/webrtc/issues/detail?id=1777
2014-07-05 17:36:20 -07:00
Aaron Jacobs
47f1577fd3
Gave the license section a makeover.
2014-07-01 13:13:46 +10:00
Aaron Jacobs
9cc184146f
Gave the test output section a makeover.
2014-07-01 13:13:03 +10:00
Aaron Jacobs
c151549937
Gave the reader/writer test section a makeover.
2014-07-01 13:11:05 +10:00
Aaron Jacobs
d61fa29da8
Gave the amalgamated source section a makeover.
2014-07-01 13:09:15 +10:00
Aaron Jacobs
b2a086adeb
Gave the documentation section a makeover.
2014-07-01 13:07:21 +10:00
Aaron Jacobs
8d0f8d0dcd
Gave the testing section a makeover.
2014-07-01 13:06:40 +10:00
Aaron Jacobs
49ed6c9774
Gave the scons section a makeover.
2014-07-01 12:06:16 +10:00
Aaron Jacobs
38c9826423
Gave the cmake section a makeover.
2014-07-01 12:02:57 +10:00
Aaron Jacobs
969921748b
Gave the using section a makeover.
2014-07-01 11:59:25 +10:00
Aaron Jacobs
ff22ca7973
Gave the introduction section a makeover.
2014-07-01 11:56:56 +10:00
Aaron Jacobs
4b687640cb
Began converting the README to Markdown.
2014-07-01 11:54:14 +10:00
Aaron Jacobs
3a0c4fcc82
Ran clang-format again.
2014-07-01 09:20:48 +10:00
Aaron Jacobs
445328ace6
Fixed some clang-format weirdness.
2014-07-01 09:15:11 +10:00
Aaron Jacobs
9fa4e849a1
Ran clang-format over all .h and .cpp files.
...
clang-format -i $(find . -name '*.h' -or -name '*.cpp')
2014-07-01 08:48:54 +10:00
Aaron Jacobs
1b137a3802
Set BinPackParameters to false.
...
This option personally drives me crazy. I think it's much more readable
to be able to see one parameter per line when there are many.
2014-07-01 08:47:46 +10:00
Aaron Jacobs
fd6ada015e
Added a clang-format config file, in preparation for formatting jsoncpp.
...
clang-format -style=llvm -dump-config > .clang-format
2014-07-01 08:45:32 +10:00
Aaron Jacobs
8540868347
Fixed some cruft in the Travis CI config file.
2014-06-30 19:57:59 +10:00
Aaron Jacobs
2de98d9bd1
Updated notification settings for Travis CI.
2014-06-30 19:51:29 +10:00
Christopher Dunn
6764059395
fix stdexcept
...
https://sourceforge.net/p/jsoncpp/bugs/68/
svn-import
2014-05-13 09:49:25 +00:00
Aaron Jacobs
5d32295a6e
Fixed a test that causes a crash when exceptions are disabled.
...
While I was at it, corrected whitespace too.
2014-04-23 23:57:59 +00:00
Aaron Jacobs
68db655347
Added structured error reporting to Reader.
...
This allows applications for interactively viewing or editing JSON to do
a better job of highlighting errors. Also added offset accessors to
Value, offering the same sort of functionality even for non-errors.
Thanks to Zach Clifford (zacharyc@google.com ) for the patch.
2014-04-23 23:41:12 +00:00
Aaron Jacobs
642befc836
Added features that allow the reader to accept common non-standard JSON.
...
This is a version of patch #17 , from Clay Wood:
http://sourceforge.net/p/jsoncpp/patches/17/
2014-04-23 23:28:23 +00:00
Christopher Dunn
77cd83890d
vim modeline
...
http://vim.wikia.com/wiki/Modeline_magic
2014-04-19 21:41:03 +00: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
ea0797351f
JSON_ASSERT -> JSON_ASSERT_MESSAGE
...
This way, assertions can produce exceptions.
https://sourceforge.net/p/jsoncpp/bugs/67/
2014-04-19 06:37:23 +00:00
Aaron Jacobs
94d17e9fdf
Added missing includes for std::istream.
...
Thanks to Quentin Fiard for the report.
2014-01-29 00:13:38 +00:00
Baptiste Lepilleur
a3f19c23a0
Fixed broken build on VS 2012
2013-09-23 14:10:39 +00:00
Aaron Jacobs
d2618806ba
Fixed some snprintf-related build breakages in Visual Studio.
2013-08-08 23:08:28 +00:00
Aaron Jacobs
36400ac0c1
Updated two calls to sprintf that I missed in r269.
2013-08-08 00:39:32 +00:00
Aaron Jacobs
32ffb931e7
Replaced the complex implementation of valueToString(double).
...
The previous one was confusing and prone to buffer overflows, and didn't
work correctly with 16-decimal-digit numbers. The new one simply uses
snprintf with a standard format string.
The major change is that we don't always print a decimal point now.
Fortunately, JSON doesn't distinguish between integers and reals.
2013-08-08 00:39:12 +00:00
Aaron Jacobs
bb53cd0899
Added more floating point tests.
...
The first demonstrates a bug that I will soon fix.
2013-08-08 00:37:39 +00:00
Aaron Jacobs
4c531bb584
Added further floating point tests.
2013-08-08 00:13:10 +00:00
Aaron Jacobs
42d918b7aa
Switched away from sprintf, which is prone to buffer overflows.
...
Most reasonable platforms have this function. If you're here because
this broke the build for you, consider adding an ifdef for your platform
and using sprintf there (but not on other platforms).
2013-08-06 23:12:56 +00:00
Baptiste Lepilleur
700b38020e
- CMake: added option to turn fail compilation if warning occurs, and warning level 4 with MSVC.
...
- Fixed some warnings
2013-05-09 18:42:33 +00:00
Baptiste Lepilleur
7b62ceacee
- disabled warning 4786 for VS6 caused by STL (identifier was truncated to '255' characters in the debug information)
...
- added batchbuild config for XP VM
2013-05-09 16:24:13 +00:00
Baptiste Lepilleur
cb5ae30f6e
Added simple batch build script for CMake.
2013-05-09 15:22:14 +00:00
Baptiste Lepilleur
58b6541478
Added missing source file to CMakeLists.txt.
2013-05-09 15:21:06 +00:00
Baptiste Lepilleur
1ccfdfcb9b
2013-05-09 15:20:32 +00:00
Baptiste Lepilleur
71860de813
Fixed continuous integration matrix for debug/release build. Made static debug build verbose.
2013-05-08 22:23:07 +00:00
Baptiste Lepilleur
c515b8ec30
Added continuous integration matrix for debug/release build. Made static debug build verbose.
2013-05-08 22:15:15 +00:00
Baptiste Lepilleur
5fff185aa4
Added continuous integration matrix for shared/static library (specified through environment variables).
2013-05-08 22:04:57 +00:00
Baptiste Lepilleur
10712e85d6
Added continuous integration failure e-mail notification.
2013-05-08 21:23:52 +00:00
Baptiste Lepilleur
53c08ad916
Added clang compiler for continuous integration.
2013-05-08 21:04:42 +00:00
Baptiste Lepilleur
79e90fba0b
Added basic Travis CI integration contributed by Igor Okulist.
2013-05-08 20:46:56 +00:00
Baptiste Lepilleur
ce277aa6e4
Fixed CMake / Unix build instructions.
2013-05-08 20:37:54 +00:00
Baptiste Lepilleur
eafd702a17
- New CMake based build system. Based in part on contribution from
...
Igor Okulist and Damien Buhl (Patch #14 ). Added support for running
tests and building with DLL on Windows.
- added missing JSON_API
- Visual Studio DLL: suppressed warning "C4251: <data member>: <type>
needs to have dll-interface to be used by..." via pragma push/pop
in json-cpp headers.
- New header json/version.h now contains version number macros
(JSONCPP_VERSION_MAJOR, JSONCPP_VERSION_MINOR, JSONCPP_VERSION_PATCH
and JSONCPP_VERSION_HEXA). While this header is generated by CMake,
it is committed to ease build with alternate build system
(CMake only update the file when it changes avoid issues with VCS).
2013-05-08 20:21:11 +00:00
Baptiste Lepilleur
a8afdd40af
- Patch #3393345 : BOOST_FOREACH compatibility. Made Json::iterator more standard compliant, added missing iterator_category and value_type typedefs (contribued by Robert A. Iannucci).
...
- Patch #3474563 : added missing JSON_API on some classes causing link issues when building as a dynamic library on Windows (contributed by Francis Bolduc).
2013-04-12 14:10:13 +00:00
Baptiste Lepilleur
f92ace5e82
Patch #3600941 : Missing field copy in Json::Value::iterator causing infinite loop when using experimental internal map (#define JSON_VALUE_USE_INTERNAL_MAP) (contributed by Ming-Lin Kao).
2013-04-12 13:26:23 +00:00
Baptiste Lepilleur
3f124172ce
Patch #3539678 : Copy constructor does not initialize allocated_ for stringValue (contributed by rmongia).
2013-04-12 13:11:14 +00:00
Baptiste Lepilleur
f8715856f3
Fix gcc -Wall warnings (patch from Matt McCormick)
2013-02-18 15:53:47 +00:00
Baptiste Lepilleur
42321f24a6
Fixed warning(error?) on #if testing value of _MSC_VER without checking that it was defined.
2012-12-20 10:08:50 +00:00
Baptiste Lepilleur
aff1171153
Added missing "include/json/assertions.h" header in amalgamate.py.
2012-07-27 09:06:40 +00:00
Aaron Jacobs
ae3c7a7aab
Made it possible to drop null placeholders from array output.
...
This can be used when it's clear that the consumer is able to deal with
this, as web browsers are. Thanks to Yatin Chawathe for the patch.
2012-03-12 04:53:57 +00:00
Aaron Jacobs
f572e8e42e
Added an exit() to JSON_FAIL_MESSAGE to fix "no return" errors.
2012-01-08 23:49:55 +00:00
Aaron Jacobs
2b853c4067
Got rid of several unnecessary includes of <iostream>.
...
Including <iostream> causes the file to be polluted with a static
initializer for the __ioinit symbol. This can harm binary startup time.
For more info, see here:
http://neugierig.org/software/chromium/notes/2011/08/static-initializers.html
2011-12-22 03:18:24 +00:00
Aaron Jacobs
7c507d7eba
Made JSON_USE_EXCEPTION's value in config.h a default that can be overridden.
...
This allows users to override it with their compiler invocation. For example:
g++ -D JSON_USE_EXCEPTION=0 ...
2011-09-14 08:41:37 +00:00
Christopher Dunn
c3763f55da
Updated bug-fix list.
2011-06-24 21:15:30 +00:00
Christopher Dunn
3b3540d9ef
bug#2407932: strpbrk() could fail for NULL pointer.
2011-06-22 21:04:41 +00:00
Christopher Dunn
9d317c3794
bug#3306345: minor typo in Path::resolve() -- missing bang.
2011-06-22 08:30:21 +00:00
Christopher Dunn
03288e8eb6
(bug#3314841) Fixed JSON_IS_AMALGAMATION. Using os.path for OSX filename compatibility.
2011-06-22 00:43:31 +00:00
Christopher Dunn
c9f91dd929
More missing constructor initializers found by Coverity.
2011-06-21 23:02:06 +00:00
Christopher Dunn
2ba3bc3252
Another simple addition for constructor initialization, PathArgument.
2011-06-21 22:08:49 +00:00
Christopher Dunn
ac5df77bbc
Simple changes to Reader initialization, from Chromium folks. (I do not think this was submitted as a bug.)
2011-06-21 21:56:54 +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
Christopher Dunn
139da63aef
Just testing whether I can still commit changes. I cannot tell my access-level from the sf project page.
2011-06-21 20:34:40 +00:00
Baptiste Lepilleur
d496e044b1
Fixed unit tests execution on MSVC 6 by removing usage of std::numeric_limits. It was returning 0 value in some max cases. Fixed Value::asFloat() to use integerToDouble().
2011-05-27 08:12:41 +00:00
Baptiste Lepilleur
f587e6a420
Fixed compilation issues with MSVC 6: replace usage of ostringstream with valueToString to support 64 bits integer and high precision floating point conversion to string. Replace usage of ULL and LL literal with UInt64(expr) and Int64(expr). Introduced helper function uint64ToDouble() to work-around missing conversion. Unit tests do not pass yet.
2011-05-26 22:55:24 +00:00
Baptiste Lepilleur
f0b24e705f
Fixed MSVS 2003, 2005 and 2008 tests execution by normalizing floating-point string representation using helper normalizeFloatingPointStr().
2011-05-26 20:14:32 +00:00
Baptiste Lepilleur
e807a7640e
Fixed unit test failure on IBM AIX xlC by hard-coding the maxUInt64AsDouble as double constant instead of relying on double(Value::maxUInt64) which produces an incorrect value.
2011-05-26 17:14:26 +00:00
Baptiste Lepilleur
d3cd9a7fc5
- Fixed unit test compilation on MSVS 2003, 2005 and 2008.
...
- Worked-around unit test failure with MSVS* by "forcing" all floating-point numbers to be loaded from memory instead of FPU registers.
2011-05-26 07:32:36 +00:00
Aaron Jacobs
a2fb7fb918
Fixed some test bugs that show up when 64-bit mode is disabled.
2011-05-26 06:58:52 +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
c649badb95
Another round of attempting to fix VC++ errors...
2011-05-26 03:44:02 +00:00
Aaron Jacobs
a9eb1eccc0
Fixed more default cases.
2011-05-26 03:32:11 +00:00
Aaron Jacobs
6ffff91c54
Got rid of some unreachable code.
2011-05-26 03:27:44 +00:00
Aaron Jacobs
acdefb0869
Fixed a double -> float compilation warning/error.
2011-05-26 03:04:01 +00:00
Aaron Jacobs
c025697ea5
Reworked the type conversion system again, so that:A
...
* isFoo methods determine exact representability.
* asFoo methods cause casting when safe.
* isConvertibleTo indicates whether casting is safe.
See NEWS.txt for details.
2011-05-26 02:46:28 +00:00
Aaron Jacobs
b0ec41c3e3
Made the unit test's output more readable, adding to jsontest's
...
capabilities (and simplifying its implementation) in the process.
2011-05-26 00:30:39 +00:00
Aaron Jacobs
2a2b5cf3ad
Made jsontest work with 64-bit integers, and fixed an error.
2011-05-26 00:12:48 +00:00
Aaron Jacobs
b6620e2801
Removed some out of date TODOs.
2011-05-25 23:26:58 +00:00
Aaron Jacobs
ccde848fd1
Fixed test failures with 64-bit support disabled.
2011-05-25 05:53:59 +00:00
Aaron Jacobs
e082248001
Fixed a 'comparison between signed and unsigned' error.
2011-05-25 05:50:13 +00:00
Aaron Jacobs
7b5edd9859
Added line breaks to make error messages easier to read.
2011-05-25 04:59:57 +00:00
Aaron Jacobs
e91a68cb9e
Fixed a compilation warning/error.
2011-05-25 04:34:57 +00:00