datadiode
09d352ac13
Remove unused functions
2015-01-17 13:26:23 +01:00
datadiode
50753bb808
Simplify Reader::decodeNumber()
2015-01-17 13:21:42 +01:00
datadiode
c1441ef5e0
stricter float parsing
...
fixes `test/jsonchecker/fail31.json`
(issue #113 )
2015-01-16 15:05:12 -06:00
Christopher Dunn
65cee6ea16
fix double->string->double round-trip (bump minor ver.)
...
See #98 .
http://stackoverflow.com/questions/747470/what-is-the-meaning-of-numeric-limitsdoubledigits10/16941784#16941784
2015-01-06 12:40:36 -06:00
Magnus Bjerke Vik
748328a0d1
Fix cmake_package install being broken because of wrong include path.
...
The TARGET_INCLUDE_DIRECTORIES from inside the
IF(JSONCPP_WITH_CMAKE_PACKAGE) block was removed, since it only needs to
be set once.
In addition the CMAKE_VERSION check was simplified.
2015-01-06 09:51:44 +01:00
dominicpezzuto
d2b6992f3e
Fix build issues related to Solaris and older GCC
...
Fixed two build issues:
- JsonCPP currently doesn’t compile for Solaris due to platform
differences with ‘isfinite’ function. Fixed by adding proper include
and define for Solaris.
- JsonCPP currently doesn’t compile for GCC version 4.1.2 and earlier
due to use of ‘-Werror=*’ compile flag, which was introduced in a later
version. Fixed by adding version check to only add this flag on
supported versions of GCC.
2014-12-27 16:45:40 -05:00
dominicpezzuto
54764dd85b
Fix build issues related to Solaris and older GCC
...
Fixed two build issues:
- JsonCPP currently doesn’t compile for Solaris due to platform
differences with ‘isfinite’ function. Fixed by adding proper include
and define for Solaris.
- JsonCPP currently doesn’t compile for GCC version 4.1.2 and earlier
due to use of ‘-Werror=*’ compile flag, which was introduced in a later
version. Fixed by adding version check to only add this flag on
supported versions of GCC.
2014-12-27 16:44:26 -05:00
Christopher Dunn
8dd32e1e2e
Merge pull request #94 from Gachapen/cmake_target_include
...
CMake: Add include directory to jsoncpp_lib target
Well-researched. Passes Travis CI.
2014-12-24 01:30:13 -06:00
Magnus Bjerke Vik
3fd7f8b470
CMake: Only add include directory to jsoncpp_lib target if CMake version supports the command.
2014-12-16 08:58:52 +01:00
Magnus Bjerke Vik
e99e6d9cc6
CMake: Add include directory to jsoncpp_lib target so that it can be easier used with other projects.
2014-12-03 15:42:41 +01:00
Rémi Verschelde
27639ce578
Add support for BUILD_SHARED_LIBS argument
...
BUILD_SHARED_LIBS is a standard CMake argument that serves the purpose
of the custom JSONCPP_LIB_BUILD_SHARED. For now we force JSONCPP_LIB_BUILD_SHARED
to true if BUILD_SHARED_LIBS was defined.
Workaround for #51 .
2014-12-01 23:47:21 +01:00
xiaoyur347
83683da13f
fix gcc warning when CXXFLAGS contains '-Wextra'
...
json_value.cpp:179:26: warning: enumeral and non-enumeral type in conditional expression [enabled by default]
https://github.com/open-source-parsers/jsoncpp/pull/84
2014-11-19 23:59:34 -06:00
Gaurav
767713be2b
Remove gcc compilation warning in json_reader.cpp
...
Submitting Patch for Issue : https://github.com/open-source-parsers/jsoncpp/issues/77
It will fix warnings in json_reader.cpp
2014-11-17 14:04:03 +05:30
Gaurav
abc1e07543
Prefer appending character constants over string literals - correct patch.
...
Submitting correct patch for https://github.com/open-source-parsers/jsoncpp/issues/61
2014-11-13 12:47:19 +05:30
Billy Donahue
8eb5d89db6
Remove initInt and initUInt until they are needed.
2014-11-10 01:35:42 -05:00
Yu Xiaolei
dc84d96a49
Add CMake package file generation support
2014-11-05 12:31:44 +08:00
Yu Xiaolei
1c3a20de50
Allow customization of component install dirs
2014-11-05 11:25:53 +08:00
Mara Kim
b84a39cae5
Add public semantic error reporting
...
Closes open-source-parsers/jsoncpp#57
2014-10-23 02:18:14 -05: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
Chuck Atkins
9dc9026e0b
Workaround for missing C99 functions in older versions of Visual Studio
2014-09-19 13:16:09 -04:00
Christopher Dunn
4002f8a4be
Revert "Revert "Removed vim mode lines.""
...
This reverts commit af77b5b59456f6a9c7a9c6a5464001ef5665f897.
See discussion at
32009b17e4 (commitcomment-7827708)
2014-09-18 16:46:40 -07:00
Christopher Dunn
0375af2eb5
drop version qualifier
...
This should help keep version.h stable.
x.y.z-dev
=> major, minor, patch, qual
== x, y, z, -dev
But we do not need -dev anymore.
2014-09-18 16:43:07 -07:00
Aaron Jacobs
ba330893d7
Ran clang-format again, this time hitting .inl files too.
...
clang-format -i $(find . -name '*.h' -or -name '*.cpp' -or -name '*.inl')
2014-09-18 16:33:49 -07:00
Christopher Dunn
877dd17206
bump version; proper SOVERSION
2014-09-16 12:42:33 -07:00
Christopher Dunn
16709c6ee8
JSONCPP_VERSION, not JSON_CPP_VERSION
2014-09-16 12:42:33 -07:00
Christopher Dunn
9aa4681052
Revert "Merge branch 'no-version'"
...
This reverts commit d9ced92d4040ee6c1475e96e18d715f99647e668, reversing
changes made to d2fa664a12b478b3fd21f7659f3674c8520bf43b.
Conflicts:
include/json/version.h (keep)
2014-09-16 12:42:32 -07:00
Christopher Dunn
af77b5b594
Revert "Removed vim mode lines."
...
This reverts commit 32009b17e4d35a812575cfcf6bae9ec49fc67446.
2014-09-16 12:42:32 -07:00
Aaron Jacobs
11086dd6a7
Enabled PointerBindsToType in clang-format options.
2014-09-15 10:15:29 +10:00
Aaron Jacobs
30b07c0275
Ran clang-format over all .h and .cpp files.
...
clang-format -i $(find . -name '*.h' -or -name '*.cpp')
2014-09-15 10:14:48 +10:00
Aaron Jacobs
32009b17e4
Removed vim mode lines.
...
Users can set their own preferences in their personal vimrc.
2014-09-15 08:23:41 +10:00
Christopher Dunn
8f730b8a60
stop using version.h.in for cmake
2014-09-11 10:09:48 -07:00
Billy Donahue
45cd9490cd
Switch to copy-and-swap idiom for operator=.
...
This allows the compiler to elide a copy when rhs is a temporary.
2014-09-10 10:37:34 -07:00
Christopher Dunn
236db83742
ws
2014-09-10 10:35:01 -07:00
Christopher Dunn
9d694516a0
clarify return value
2014-09-03 13:54:49 -07:00
Christopher Dunn
d94caac1ea
ws
2014-09-03 13:46:37 -07:00
mloy
8eb6f88a87
snprintf does return a signed integer
...
assert if returned value is neagtive
2014-09-03 13:37:17 -07:00
Matthias Loy
64d591b720
snprintf already calculated the length
2014-09-03 13:37:17 -07:00
Matthias Loy
fe2cd01e80
free does nothing if parameter equals NULL
2014-09-03 13:37:17 -07:00
Don Milham
5bf16105b5
added option to FastWriter which omits the trailing new line character
2014-09-02 17:09:07 -06:00
Matthias Loy
48d9a92a1b
do intermediate step in order to omit "dereferencing type-punned pointer" error
2014-08-13 13:20:29 +02:00
Matthias Loy
f97723dbb7
provoke compile error:
...
"dereferencing type-punned pointer will break strict-aliasing rules [-Werror=strict-aliasing]"
2014-08-13 13:19:02 +02:00
David West
bc5dbc6d41
Patch for bug #53 on version 0.5.0
...
This is a patch that we have utilized at IDEXX Labs for the the bug described above.
We have tested and verified this on x86 32 and 64 bit linux and 32 bit arm.
2014-08-13 02:03:33 -07:00
Egor Tensin
81d16dfda1
Fixed deprecated target file path location
2014-08-13 02:02:53 -07:00
Chris Gilling
97c77b4a86
add tests to check that exceptions are thrown for wrong types
...
* Add JSONTEST_ASSERT_THROWS macro to test if an expression
throws an exceptions.
* add JSONTEST_FIXTURE(ValueTest, typeChecksThrowExceptions)
2014-08-13 02:00:41 -07:00
pffang
27e3263894
WinCE Compatibility Fix
...
Note: str.imbue and std::locale::classic() are not supported on WINCE
2014-07-10 20:27:52 -07:00
Christopher Dunn
8582876c5c
vim modelines
2014-07-10 20:24:23 -07:00
Christopher Dunn
496c655523
fix numeric locale
...
In some locales (e.g. de_DE) floats have commas instead of
dots, but JSON requires dots.
See:
https://github.com/open-source-parsers/jsoncpp/pull/9
https://github.com/open-source-parsers/jsoncpp/pull/3
2014-07-10 20:24:23 -07:00
Christopher Dunn
49c732607b
Revert "Merge pull request #7 from steffen-kiess/fix-locale"
...
This reverts commit 0db9d6ea013792b010c598c2a9a3a9e39a2decd9, reversing
changes made to 06dcb1fc8922991919887e229fdd741bccde0dfa.
For discussion, see
https://github.com/open-source-parsers/jsoncpp/pull/9
https://github.com/open-source-parsers/jsoncpp/pull/3
2014-07-10 19:59:26 -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