Christopher Dunn
2c872ec997
Merge pull request #406 from magnific0/master
...
std::snprintf not part of std for MinGW32 using c++11
2016-02-06 10:21:45 -06:00
Christopher Dunn
b860cc38e8
Merge pull request #414 from cdunn2001/conversion-errors
...
Fix conversion warnings/errors
2016-02-06 10:19:23 -06:00
Christopher Dunn
fef4b75796
More conversion fixes for gcc
2016-02-06 10:10:49 -06:00
Christopher Dunn
779d8a33fc
Try to find ptrdiff_t for GNUC 4.9.2
...
https://travis-ci.org/open-source-parsers/jsoncpp/jobs/107452667
2016-02-06 09:49:29 -06:00
Christopher Dunn
d4513fcf45
Fix conversion warnings/errors
...
See #411 .
http://paste.debian.net/378673/
2016-02-06 09:25:20 -06:00
Christopher Dunn
baefec773c
In case cmake is run in root-dir
2016-02-06 08:29:12 -06:00
Christopher Dunn
bc72070f43
Merge pull request #393 from ds283/cmake-binary-dir
...
Change ${CMAKE_BINARY_DIR} to ${CMAKE_CURRENT_BINARY_DIR}
2016-02-04 15:05:02 -06:00
Jacco
bc9b445fee
std::snprintf fix for MinGW32 c++11
2016-01-25 11:39:36 +01:00
Jacco
2646ac5fa5
std::snprintf fix for MinGW32 c++11
2016-01-25 11:38:49 +01:00
ds283
2cca1cd239
Change ${CMAKE_BINARY_DIR} to ${CMAKE_CURRENT_BINARY_DIR}
...
- if building as a submodule of another repository, installation of pkg-config files can fail because they may not be in the top-level binary directory
- changing ${CMAKE_BINARY_DIR} to ${CMAKE_CURRENT_BINARY_DIR} allow CMake to find the files for installation
2015-12-05 12:18:12 +00:00
Christopher Dunn
9234cbbc90
Merge pull request #387 from joerg-krause/cmake-option-strict-iso
...
Disable -pedantic conditionally; add -pedantic-errors and -Werror conditionally
2015-10-30 01:16:49 -05:00
Jörg Krause
7c93031c9b
Enable -Werror with JSONCPP_WITH_WARNING_AS_ERROR
...
Commit 912d55094d2f3b777bcb48a76c2ed32447c7795e disabled '-Werror'. Enable it
if jsoncpp is build with JSONCPP_WITH_WARNING_AS_ERROR=ON.
2015-10-29 09:21:01 +01:00
Jörg Krause
48bfe91062
Add option JSONCPP_WITH_STRICT_ISO
...
'-pedantic' issues all warnings demanded by strict ISO C/C++; rejecting
extensions that do not follow ISO C/C++. Without this option, certain GNU
extensions and traditional C/C++ features are supported as well.
With this option enabled building jsoncpp fails with the musl toolchain on
x86 because of an incompatible posix_memalign declaration [1]. Without
'-pedantic' there is no error anymore and jsoncpp builds fine.
Add an option JSONCPP_WITH_STRICT_ISO to disable compilation with '-pedantic'
with GCC. If jsoncpp is build with the JSONCPP_WITH_WARNING_AS_ERROR option
'-pedantic-errors' is used instead.
[1] https://gcc.gnu.org/ml/gcc-patches/2015-05/msg01425.html
2015-10-29 09:16:21 +01:00
Christopher Dunn
0cce773019
Merge pull request #384 from EvinceMoi/master
...
json_reader throwRuntimeError return error details
2015-10-27 15:48:05 -05:00
Evince
6b10ce8c0d
json_reader throwRuntimeError return error details instead of hard-coded message
...
Signed-off-by: Evince <baneyue@gmail.com>
2015-10-28 00:22:46 +08:00
Christopher Dunn
34bdbb58b4
Merge pull request #267 from cdunn2001/moveSemantics
...
move ctors
2015-10-21 01:13:59 -05:00
Christopher Dunn
527965cbde
Minor
...
adjustments, based on comments in PR.
2015-10-19 23:49:07 -05:00
Motti
2b00891a86
move ctors
...
* Add move constructor to Value::CZString
* Add unit test for Value move constructor
* Allow includer to specify in advance the value for
JSON_HAS_RVALUE_REFERENCES
2015-10-19 23:42:52 -05:00
Christopher Dunn
a4ce2829dc
Some indentation
...
in anticipation of another change.
2015-10-19 23:40:47 -05:00
Christopher Dunn
69e7f1c858
Merge pull request #382 from cdunn2001/ccache
...
Support ccache
2015-10-19 22:50:41 -05:00
Christopher Dunn
d1a2b94d5b
Support ccache
...
http://stackoverflow.com/a/24305849/263998
2015-10-19 12:10:58 -05:00
Christopher Dunn
772f634548
Merge pull request #381 from bknecht/precision
...
Resolves #284
2015-10-15 16:15:15 -05:00
Benjamin Knecht
9fd1ca8d68
Add test code for precision
2015-10-15 18:32:24 +02:00
Benjamin Knecht
38022157b2
making precision unsigned int
...
adding precision as settings value for StreamBuilder
2015-10-15 18:00:42 +02:00
Benjamin Knecht
039a6e3b61
Create format string with sprintf.
...
For now use hardcoded precision '17' for now
2015-10-15 17:28:56 +02:00
Christopher Dunn
9c17e61bd0
Merge pull request #379 from cdunn2001/issue-377
...
Iterator conversions
2015-10-10 17:20:37 -05:00
ycqiu
c8a8cfcd4b
fix
...
In value.h, ValueConstIterator can convert to ValueIterator, I think that is a bug. the correct way is ValueIterator can convert to ValueConstIterator.
2015-10-10 17:17:20 -05:00
ycqiu
4994c77d09
add test code
...
does not compile
2015-10-10 16:22:14 -05:00
Christopher Dunn
beae99924f
Merge pull request #373 from antonindrawan/QNX_support
...
Compiles jsoncpp with QNX 6.6
2015-10-04 14:54:09 -05:00
Christopher Dunn
8b9940fd24
Merge pull request #375 from Dani-Hub/issue-374-remove-defaulted-ctor
...
Remove defaulted default constructor
2015-10-03 16:03:27 -05:00
drgler
b96d90efbd
Remove defaulted default constructor
2015-10-03 19:40:23 +02:00
Anton Indrawan
e375b8c89e
Compiles jsoncpp with QNX 6.6
2015-10-03 11:48:19 +02:00
Christopher Dunn
49393ead06
Merge pull request #371 from mathstuf/more-platform-support
...
json_writer: improve isfinite support on *nix
2015-10-03 03:58:20 -05:00
Ben Boeckel
8df11d518b
json_writer: improve isfinite support on *nix
...
Based on a patches to CMake by:
Ådne Hovda <ahovda@openit.com>:
commit 7b1cdb00279908cacabada92f8a53e4986465423
jsoncpp: Provide 'isfinite' implementation on older AIX and HP-UX
Newer AIX and HP-UX platforms provide 'isfinite' as a <math.h> macro.
Older versions do not, so add the definition if it is not provided.
Michael Scott <michael.scott@gbgplc.com>:
commit 9217b678b305d7df7471ba476a81bf28961fdfa3
jsoncpp: Provide 'isfinite' impl on more HP-UX versions (#15576 )
Some versions of HP-UX do not define 'isfinite' or 'finite' in math.h
for Itanium when preprocessing with C++, so we have to add the
definition ourselves instead to map to the internal version.
Joerg Sonnenberger <joerg@bec.de>:
commit 75644dafe54c21902f14cfe58cb8338b553b69d8
jsoncpp: Fix compilation as C99 on Solaris
In C99 mode, Solaris variants may already define isfinite, so check for
the existence first.
2015-10-01 13:27:19 -04:00
Christopher Dunn
8e400e9be7
Merge pull request #368 from mathstuf/export-factory-inner-class
...
reader: export CharReader::Factory
2015-09-28 17:06:34 -05:00
Christopher Dunn
dc5aa4ad7f
Fix VS warnings
...
These don't really need to be const.
resolves #369
2015-09-28 17:05:57 -05:00
Ben Boeckel
80def66fa5
reader: export CharReader::Factory
2015-09-28 15:45:11 -04:00
Christopher Dunn
6992831c1c
Merge pull request #367 from Dani-Hub/issue-350-unique_ptr-2
...
__cplusplus value should not be used to decide for std::unique_ptr
resolves #350
2015-09-28 11:27:29 -05:00
drgler
7e4875a239
__cplusplus value should not be used to decide for std::unique_ptr #350 :
...
In addition to the C++ language version define __cplusplus also check _CPPLIB_VER for better Dinkumware support.
2015-09-27 14:03:35 +02:00
Christopher Dunn
979cbec237
Fully init OurReader
...
See #363 , similar to #364 .
2015-09-23 09:44:58 -05:00
Christopher Dunn
2e625dd9af
Merge pull request #364 from ya1gaurav/patch-28
...
Have default ctor for OurFeatures
2015-09-23 09:41:17 -05:00
Gaurav
83ea25e5e2
Make OurFeatures ctor as default.
...
Please review suggested changes.
2015-09-23 09:42:26 +05:30
Christopher Dunn
5721f1ca57
Merge pull request #366 from ya1gaurav/patch-30
...
parseCommandLine also throws
2015-09-22 05:09:33 -05:00
Christopher Dunn
9942f6a1c7
Merge pull request #365 from ya1gaurav/patch-29
...
Remove conditional check for isMultiLine
2015-09-22 05:08:56 -05:00
Gaurav
6c14548293
parseCommandLine also throws
...
Catching exceptions thrown by parseCommandLine (std::bad_alloc & std::length_error) also.
2015-09-22 13:53:19 +05:30
Gaurav
6ee0bff822
Remove conditional check for isMultiLine
...
At all 3 places isMultiLine is checked in for loop :
for (int index = 0; index < size && !isMultiLine; ++index) {
It means !isMultiLine is always true (otherwise do not enter loop), so || condition does not depend on isMultiLine, so removed that.
2015-09-22 09:48:54 +05:30
Gaurav
e3b35992f8
Add default value of stackLimit couple of places
...
stackLimit default value is missing at two places.Adding them.
2015-09-21 18:05:15 +05:30
Christopher Dunn
cc5cdb565c
Merge pull request #348 from cdunn2001/override-keyword
...
C++11: override keyword
2015-09-05 12:12:37 -05:00
Gaurav
aadd0b1b63
C++11: override keyword
...
Source : http://en.cppreference.com/w/cpp/language/override
2015-09-05 12:03:38 -05:00
Christopher Dunn
3ee15b7bcc
Merge pull request #339 from Dani-Hub/master
...
Floating-point NaN or Infinity values should be allowed as a feature …
2015-09-05 11:59:54 -05:00
drgler
68509e6161
Fix number reading in the presence of Infinity: Only check for infinity if we have a leading sign character.
2015-09-05 14:49:33 +02:00
drgler
4cea1f6f6c
Adjust whitespace formatting
2015-09-05 14:48:29 +02:00
Daniel Krügler
6f9ed421d0
Merge pull request #2 from BillyDonahue/billy_danihub_fix
...
Billy danihub fix
2015-09-05 13:38:04 +02:00
Billy Donahue
7f7bbeff76
don't need out field of TestData
2015-09-05 04:22:18 -04:00
Billy Donahue
bfffe8cec7
prettier test
2015-09-05 04:07:56 -04:00
Billy Donahue
73154fb546
expanded Infinity test
2015-09-05 03:48:38 -04:00
drgler
63c747218b
Floating-point NaN or Infinity values should be allowed as a feature #209
...
Introduce 'allowSpecialFloats' for readers and 'useSpecialFloats' for writers, use consistent macro snprintf definition for writers and readers, provide new unit tests for #209
2015-09-03 22:50:03 +02:00
drgler
2084563efb
Floating-point NaN or Infinity values should be allowed as a feature #209
...
Introduce 'allowSpecialFloats' for readers and 'useSpecialFloats' for writers, use consistent macro snprintf definition for writers and readers, provide new unit tests for #209
2015-09-03 22:19:22 +02:00
Christopher Dunn
6329975e6d
Merge pull request #337 from AMDmi3/patch-1
...
Specify float constant as float
2015-08-21 20:45:37 -05:00
Dmitry Marakasov
7acfd599f0
Specify float constant as float
...
Otherwise, on some 32 bit platforms this may not fit into long and compilation will fail:
src/test_lib_json/main.cpp:1260: error: integer constant is too large for 'long' type
2015-08-21 21:19:26 +03:00
Robert Dailey
63a961a752
Clean up cmake END* (again)
...
(I missed a couple. ~cd)
2015-08-14 14:47:46 -07:00
Christopher Dunn
cb2378fa41
Merge pull request #332 from cdunn2001/END
...
Clean up cmake END*
2015-08-14 14:40:42 -07:00
Robert Dailey
37aaaec70e
Clean up cmake END*
...
* Clean up closing statements for if conditions, functions, macros,
and other entities. Newer versions of CMake do not require you to
redundantly respecify the parameters to the opening arguments.
2015-08-14 14:31:08 -07:00
Christopher Dunn
585446e6b3
Merge pull request #327 from cdunn2001/more-gitattributes
...
More gitattributes
2015-08-09 16:38:21 -07:00
Christopher Dunn
7f4be39e9f
add .gitattributes
...
helps #325
2015-08-09 16:25:36 -07:00
Christopher Dunn
47595e922b
normalized some windows VS stuff
2015-08-09 16:23:50 -07:00
Christopher Dunn
9f7dbcb19b
Merge pull request #326 from rcdailey/git-attributes
...
Introduce .gitattributes file and normalize line endings
2015-08-09 16:23:20 -07:00
Robert Dailey
c1996256d6
Normalize line endings
...
This commit contains nothing but line ending normalization
changes. These changes were performed after the introduction
of .gitattributes into the repository.
2015-08-09 18:02:52 -05:00
Robert Dailey
25e4adc4e1
Add .gitattributes file
2015-08-09 18:02:37 -05:00
Aaron Jacobs
cc2c15c3eb
Remove undefined behavior from a left shift of a negative value.
...
Fixed by shifting a positive value, then negating the result.
(Credit: Richard Trieu)
2015-08-03 10:58:29 +10:00
Christopher Dunn
912d55094d
Merge pull request #323 from joerg-krause/master
...
Remove -Werror
2015-08-02 15:48:38 -05:00
Jörg Krause
d7b84f69c5
Remove Werror
...
-Werror shouldn't be used in released code since it can cause random build
failures on moderate warnings. It also depends on the used toolchain since
different toolchains may or may not print the same warnings.
2015-07-30 23:56:28 +02:00
Christopher Dunn
9dad198af6
Merge pull request #320 from shields/negation-overflow
...
Fix cases where the most negative signed integer was negated, causing undefined behavior.
2015-07-28 11:35:52 -05:00
Michael Shields
7f06e9dc28
Fix cases where the most negative signed integer was negated, causing
...
undefined behavior.
2015-07-27 16:35:19 -07:00
Christopher Dunn
d84702c903
1.6.5
1.6.5
2015-07-23 00:26:13 -05:00
Christopher Dunn
949babd7b0
Exceptions declared in header
...
resolves #272
2015-07-23 00:26:13 -05:00
Christopher Dunn
6ed877c77c
correction for #316
2015-07-23 00:26:13 -05:00
Christopher Dunn
1c69568f8d
Merge pull request #316 from filipjs/master
...
Update json_tool.h
typo in a comment
2015-07-17 06:44:33 -05:00
filipjs
770fdda28b
Update json_tool.h
...
Fix a typo in comment.
2015-07-14 14:34:07 +02:00
Christopher Dunn
81cf237917
Merge pull request #314 from cdunn2001/master
...
-Werror
plus small bug-fix
2015-07-12 14:38:02 -05:00
Christopher Dunn
cac79543f8
1.6.4
...
minor bug-fix
2015-07-12 14:29:53 -05:00
Christopher Dunn
d8186f36a6
-Werror
2015-07-12 14:28:55 -05:00
Christopher Dunn
7f240623d3
fixed a bug found by -Wshadow
2015-07-12 14:28:55 -05:00
Christopher Dunn
784433ac72
fix some warnings
2015-07-12 14:28:37 -05:00
Christopher Dunn
7275e3ce3c
drop -Wsign-conversion
2015-07-12 12:49:57 -05:00
Christopher Dunn
46aa9d75fa
-Wconversion
...
* https://gcc.gnu.org/onlinedocs/gcc/Warning-Options.html
* http://programmers.stackexchange.com/questions/122608/clang-warning-flags-for-objective-c-development/124574#124574
In clang: `-Wconversion` implies `-Wshorten-64-to-32`
2015-07-12 12:39:04 -05:00
Christopher Dunn
f94a0e8989
auto-generated file with minor update
2015-07-12 12:31:43 -05:00
Christopher Dunn
e22a2f36f7
Merge pull request #313 from cdunn2001/master
...
`-std=c++11` for gcc builds too
There was an issue with Travis, but we seem to be past that now.
We were using only -std=c++0x for gcc, as you can see in the diff.
resolves #134
2015-07-12 12:18:28 -05:00
Christopher Dunn
fac87108a4
-std=c++11 for gcc builds too
2015-07-12 12:08:34 -05:00
Christopher Dunn
14fc9f124e
Merge pull request #312 from cdunn2001/master
...
gcc-4.9, clang (3.0)
2015-07-12 12:04:41 -05:00
Christopher Dunn
658fa37e63
gcc-4.9, clang (3.0)
2015-07-12 11:53:49 -05:00
Christopher Dunn
056e5f9b64
Merge pull request #309 from cdunn2001/master
...
dockerize the Travis build, and allow C++11
2015-07-11 14:19:02 -05:00
Christopher Dunn
d8e8c14ffc
valgrind in Travis
2015-07-11 14:11:45 -05:00
Christopher Dunn
f4e6fccd46
dockerize the Travis build
...
Docker builds are *much* faster in Travis.
Also, we prepare to enable C++11.
2015-07-11 14:06:18 -05:00
Christopher Dunn
2428889813
1.6.3
2015-07-11 13:41:13 -05:00
Christopher Dunn
89704039a0
minor doc fix, for #302
2015-07-11 12:11:00 -05:00
Christopher Dunn
6ca8ffcb91
Merge pull request #305 from cdunn2001/fix-fixeol-undefined-name-sys
...
Fix undefined name "sys"
Same as #299 (bca0eff), but an earlier commit needed to be rebased.
2015-07-11 11:17:09 -05:00
Mike Naberezny
b5e70f950e
Fix undefined name "sys"
...
Same as #299 (bca0eff81a1c5ef160d9858b8e89b1c919b71c1f), but an earlier
commit needed to be rebased.
2015-07-11 11:15:43 -05:00
Christopher Dunn
b26804d1c2
Merge pull request #304 from cdunn2001/297
...
Same as #297 (1c4f274ab32594d717fc442a0f8a68d9e7633637), but properly rebased
2015-07-11 11:08:47 -05:00
Stuart Eichert
702a539762
Fix #296 : Explicitly cast size_t results to unsigned when needed
...
This is rebased from #297 , where AppVeyor had been failing, and which
was not properly based on the master branch.
2015-07-11 11:00:18 -05:00