1350 Commits

Author SHA1 Message Date
Julien Schueller
f45c01a46e Enable shared libs on appveyor 2017-07-12 17:36:23 +02:00
Julien Schueller
3c2069fdd1 Cleanup appveyor script 2017-07-12 17:35:22 +02:00
Christopher Dunn
414b179d86 Merge pull request #635 from Dark-Passenger/master
Add move assignment operator for Json::Value class and overload append member function for RValue references

resolves #621
2017-07-11 16:08:36 -05:00
Dhruv Paranjape
0ba8bd73f5 add move assignment operator for CZString and change copy assignment to const reference. 2017-07-08 17:47:13 +05:30
Dhruv Paranjape
23c44d9f9e overload append function for R value references. 2017-07-08 17:30:47 +05:30
Dhruv Paranjape
8996c377aa add move assignment operator for Json::Value class. 2017-07-08 17:27:07 +05:30
Christopher Dunn
a679dde58d 1.8.1 1.8.1 2017-06-25 22:01:22 -07:00
Christopher Dunn
c21b4bbfdb Merge pull request #625 from SoapGentoo/mesonise
Add initial Meson build file
2017-06-25 21:51:15 -07:00
David Seifert
d14d8c35c3 Update Travis configuration 2017-06-26 06:12:05 +02:00
David Seifert
ed258de63d Add initial Meson build file 2017-06-26 06:12:05 +02:00
Christopher Dunn
154652ee7a Merge pull request #623 from bernhardHartleb/master
Fix #567 in writing real values in different locales
2017-06-24 10:34:14 -07:00
Bernhard Hartleb
4a9d77bcf7 Fix issue #567 in writing real values in different locales
The output of snprintf might produce ',' separators for decimal places if
certain locales are set. This commit moves the converversion from ',' to '.'
to correct place. Otherwise an additional ".0" might be appended.
2017-06-22 22:46:16 +02:00
Christopher Dunn
56efb6ba83 Merge pull request #622 from sylvestre/master
Allocate the proper memory for formatString. Fix a warning with gcc 7.1
2017-06-12 19:44:58 -05:00
Sylvestre Ledru
7f9cc2705c Allocate the proper memory for formatString. Fix a warning with gcc 7.1
/root/firefox-gcc-last/toolkit/components/jsoncpp/src/lib_json/json_writer.cpp:139:16: note: using the range [-2147483648, 2147483647] for directive argument
/root/firefox-gcc-last/toolkit/components/jsoncpp/src/lib_json/json_writer.cpp:146:10: note: 'sprintf' output between 5 and 15 bytes into a destination of size 6
   sprintf(formatString, "%%.%dg", precision);
   ~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2017-06-09 22:41:48 +02:00
Christopher Dunn
d7347a2623 Merge pull request #609 from antonindrawan/QNX_Fix
Fix QNX build: QNX defines sprintf under the std namespace.
2017-05-01 21:52:55 -05:00
Anton Indrawan
2e319850d1 Fix QNX build: QNX defines sprintf under the std namespace. Use snprintf instead 2017-05-01 23:14:23 +02:00
Christopher Dunn
a3d35d7fb8 Merge pull request #607 from ssbr/master
Refactor authorship information for more technical accuracy.
2017-04-25 00:51:37 -05:00
Devin Jeanpierre
19fc55f408 Refactor authorship information for more technical accuracy.
Google advises its employees to add Google Inc. as an author, but that hasn't
been done yet and would be super inconvenient. So instead I've refactored the
file to refer to "The JsonCpp Authors", which are listed in the AUTHORS file.

The AUTHORS file itself is generated via:

    git log --pretty="%an <%ae>%n%cn <%ce>" | sort | uniq

Plus the addition of "Google Inc." as a copyright author. (Google owns the work
of anyone contributing from an @google.com address, for example.)

The list contains some probable duplicates where people have used more than one
email address. I didn't deduplicate because -- well, who's to say they're
duplicates, anyway? :)
2017-04-24 11:01:12 -07:00
Christopher Dunn
acf74290f1 Merge pull request #601 from paulobrizolara/master
Including instructions in how to use jsonCpp with conan
2017-04-09 21:47:09 -05:00
paulo
746ef154f1 Including instructions in how to use jsonCpp with conan
Also added the badge to the conan package.

Related to issue #564
2017-04-09 14:14:38 -03:00
Christopher Dunn
559b4416e6 Merge pull request #599 from pavel-pimenov/fix-v815
Fix V815:Decreased performance
2017-04-08 00:49:25 -05:00
pavel.pimenov
6ca374371e Fix V815:Decreased performance 2017-04-07 15:41:07 +03:00
Christopher Dunn
f7df408a6a Merge pull request #593 from AlB80/master
Optimize Value::isIntegral() method
2017-04-05 20:09:53 -05:00
Christopher Dunn
86ed860c4b Merge pull request #589 from ya1gaurav/patch-42
Fix warning issue with gcc flags.

closes #586
2017-04-05 19:50:21 -05:00
Alexander V. Brezgin
c442fd96e6 Optimize Value::isIntegral() method
Worst case called modf() twice
2017-03-29 06:37:37 +05:00
Gaurav
c68443f3a0 Fix Cmake build issue
FIx cmake build.
2017-03-10 10:33:03 +05:30
Gaurav
11c48d0047 Fix warning issue with gcc flags.
PR for - https://github.com/open-source-parsers/jsoncpp/issues/586
Separating the default options for compiler flags.
2017-03-10 10:22:33 +05:30
Christopher Dunn
264c3edca7 Merge pull request #573 from ya1gaurav/patch-39
Fix crash issue due to NULL value.
2017-03-09 16:06:37 -06:00
Christopher Dunn
a47fc398ef Merge pull request #571 from ibc/master
README: Give some love
2017-03-09 15:58:32 -06:00
David Seifert
2f178f390f Use full CMake paths in pkg-config template
Using full paths is more versatile. The current solution
breaks when specifying an absolute path for CMAKE_INSTALL_INCLUDEDIR
which is an otherwise supported option by CMake's GNUInstallDirs.
CMake does not support Autoconf-style ${prefix}-pseudo variables,
hence trying to emulate the behaviour gains us nothing and breaks
providing absolute paths to CMAKE_INSTALL_LIBDIR.
2017-03-09 07:13:45 -06:00
Gaurav
f251f15e6a Fix crash issue due to NULL value.
Null value in Value constructor will crash strlen(). Avoid crash with JSON_ASSERT_MESSAGE
2017-01-17 17:28:43 +05:30
Iñaki Baz Castillo
60bfcf1715 README: Give some love. 2017-01-12 11:24:29 +01:00
Christopher Dunn
81065748e3 Merge pull request #566 from open-source-parsers/update
std::min<unsigned>, for VS2015

fixes #565
2016-12-21 12:56:14 -06:00
Christopher Dunn
11836ae9aa std::min<unsigned>, for VS2015
fixes #565
2016-12-21 11:09:57 -06:00
Christopher Dunn
e25fb5384a Path for pkg-config
See #497, bottom comment.
2016-12-19 11:42:51 -06:00
Christopher Dunn
f700fe4559 Require cmake>=3.1
Plus some other build-related changes. I don't think there is anything
functionally different from 1.7.7, or even any binary incompatibilities, but
the cmake change is significant.
1.8.0
2016-12-14 13:39:05 -06:00
Christopher Dunn
d167a09b1c Merge pull request #562 from SoapGentoo/cmake-fixes
Replace current install variables with GNUInstallDirs
2016-12-14 13:30:53 -06:00
David Seifert
ba158fd22d
Update Travis requirements for modern CMake 2016-12-14 17:53:10 +01:00
David Seifert
f3a4941590
Replace current install variables with GNUInstallDirs
* The GNUInstallDirs module is more idiomatic and supported by
  Kitware upstream, whereas the current directories are not
  standardised across CMake-using packages. Using CMake native
  mechanisms is better than reinventing the wheel, as it makes
  using the build system more uniform across the ecosystem
* Use CMAKE_CXX_STANDARD to force C++11
* Require CMake 3.1.0 at a minimum
* Fixed lower/UPPERcase format for function/macro calls
* Fixed indents by replacing tabs with 4 spaces
2016-12-14 17:53:10 +01:00
Christopher Dunn
0d25d9aebf Merge pull request #556 from Infotecs/nnkur-rec-fix
Removed a static variable used to contain the current recursion depth in json_reader.cpp
2016-12-09 10:47:17 -06:00
nnkur
5021e799dc Renamed JSONCPP_STACK_LIMIT to JSONCPP_DEPRECATED_STACK_LIMIT
Renamed JSONCPP_STACK_LIMIT to JSONCPP_DEPRECATED_STACK_LIMIT to stress that usage of this macros assumes old interface.
2016-12-07 15:47:08 +03:00
Christopher Dunn
762ad0fe9d Merge pull request #557 from sergiy80/master
Add pragma pack directive

resolves #458
2016-12-05 00:14:08 -06:00
Sergiy80
d6e666f573 Add pragma pack directive
Related to https://github.com/open-source-parsers/jsoncpp/issues/458
2016-12-03 22:29:14 +02:00
nnkur
2ecd2a59de Add files via upload
Removed a static variable used to contain the current recursion depth of Reader::readValue().  The number of elements in an internal container Reader::nodes_  is used instead.  It is correct because any recursive call of Reader::readValue() is executed with adjacent nodes_.push()  and nodes_.pop() calls.  
Added the option to change the allowed recursion depth at compile time by defining a macro JSONCPP_STACK_LIMIT as the required integer value.
2016-11-30 18:30:12 +03:00
Christopher Dunn
a691cb19de Merge pull request #553 from AlB80/master
Clarify code for value type return
2016-11-20 18:53:23 -06:00
Alexander V. Brezgin
ee7935986e Optimize value check 2016-11-20 03:55:08 +03:00
Alexander V. Brezgin
b4abc8241f Optimize value range check 2016-11-20 03:50:32 +03:00
Alexander V. Brezgin
12e9ef32f9 Remove repeated condition
isDouble() contains isIntegral()
2016-11-20 03:28:15 +03:00
Christopher Dunn
77632b2611 Merge pull request #549 from jia3ep/master
Added stack overflow test
2016-11-09 14:28:13 -06:00
Kirill V. Lyadvinsky
89aa87bd24 Use clang-3.5 since the Travis version has a conflict with gcc (check this issue https://bugs.debian.org/cgi-bin/bugreport.cgi?msg=11;bug=744872) 2016-11-09 12:05:22 +03:00
Christopher Dunn
34fc0020c0 Merge pull request #552 from omki2005/noexcept
change throw() to noexcept to conform to c++11
2016-11-08 07:21:56 -06:00
Christopher Dunn
f880a9432d Merge pull request #551 from suttungdigital/detect_locale_support
Check for locale support in CMake
2016-11-08 07:19:51 -06:00
Magnus Bjerke Vik
5a82131033 Rename NO_LOCALE_SUPPORT to JSONCPP_NO_LOCALE_SUPPORT 2016-11-08 09:47:27 +01:00
Magnus Bjerke Vik
1839f2da34 Check for locale support in CMake 2016-11-08 09:47:27 +01:00
Omkar Wagh
91c1d23461 change throw() to noexcept to conform to c++11 2016-11-07 17:39:38 -05:00
Kirill V. Lyadvinsky
86f085b810 Make it a bit more multithreading friendly 2016-11-03 22:45:36 +03:00
Kirill V. Lyadvinsky
ac372d2b00 Added stack overflow test 2016-11-02 15:33:57 +03:00
Christopher Dunn
0e24e3c64f Merge pull request #547 from BrendanDrewDaqri/master
resolves #546: Ensure floating point values on input render as floats on output
2016-10-28 01:22:38 -05:00
Brendan Drew
89ab7eca7f Ensure that the fact that a float was provided on input is preserved when writing output; update tests to reflect this fact 2016-10-27 04:49:11 -07:00
Christopher Dunn
a1db52b030 Merge pull request #543 from chfast/patch-1
Rename variable empty to emptyString
2016-10-24 11:16:24 -05:00
Paweł Bylica
1572539bec Rename variable empty to emptyString
Rename variable empty to emptyString in Value constructor to avoid shadowing of Value::empty().

GCC 4.8 produces the warning about this:
lib_json/json_value.cpp: In constructor ‘Json::Value::Value(Json::ValueType)’:
lib_json/json_value.cpp:346:27: warning: declaration of ‘empty’ shadows a member of 'this' [-Wshadow]
2016-10-14 11:59:28 +02:00
Christopher Dunn
d8cd848ede 1.7.7 1.7.7 2016-10-02 11:32:21 -05:00
Christopher Dunn
92259f7147 Bump SOVERSION, separate from MAJOR.MINOR.MICRO 2016-10-02 11:29:12 -05:00
yiqiju
4a431bcdac Fix typo
resolves #538
2016-10-02 10:52:13 -05:00
Christopher Dunn
7d868636de Merge pull request #536 from vriera/master
resolves #537
closes #538
2016-09-27 20:12:01 -05:00
Vicente Olivert Riera
ab0f1e234a Include stdint.h necessary for int64_t and uint64_t
Otherwise failures like these one can happen during the configure phase
of other applications that use jsoncpp, like upmpdcli for instance:

checking jsoncpp/json/json.h usability... yes
checking jsoncpp/json/json.h presence... yes
checking for jsoncpp/json/json.h... yes
configure: error: libjsoncpp not found.

And this is the actual problem that you can see in config.log:

configure:5233: checking for jsoncpp/json/json.h
configure:5233: result: yes
configure:5259: /usr/bin/mipsel-linux-g++ -o conftest conftest.cpp
-lmicrohttpd -lmpdclient -lpthread  -ljsoncpp >&5
In file included from /usr/include/jsoncpp/json/autolink.h:9:0,
                 from /usr/include/jsoncpp/json/json.h:9,
                 from conftest.cpp:26:
/usr/include/jsoncpp/json/config.h:155:9: error: 'int64_t' does not name
a type
 typedef int64_t Int64;
         ^
/usr/include/jsoncpp/json/config.h:156:9: error: 'uint64_t' does not
name a type
 typedef uint64_t UInt64;
         ^

Signed-off-by: Vicente Olivert Riera <Vincent.Riera@imgtec.com>
2016-09-26 11:24:32 +01:00
Christopher Dunn
45a560a8c0 1.7.6 <- 1.7.5 1.7.6 2016-09-25 19:05:56 -05:00
Christopher Dunn
4893a8f667 Merge pull request #535 from kavika13/master
Add RPATH to dynamic library build on OSX

fixes #534 

But we will revert if there are any complaints.
2016-09-25 18:58:14 -05:00
Gergely Nagy
f6d785fda8 Fix poss SEGV
for non-null terminated input.
2016-09-25 18:45:04 -05:00
Merlyn Morgan-Graham
8d54e333ff Add RPATH to dynamic library build on OSX 2016-09-22 22:06:25 -07:00
Christopher Dunn
b063cf4ada Merge pull request #529 from chrox802/chrox802-patch-1
fix a bug about Json::Path
2016-09-07 21:57:56 -05:00
Christopher Dunn
c4ab6d733f Merge pull request #528 from DrMetallius/master
Used macros to disable localeconv() calls
2016-09-07 21:52:18 -05:00
chason
2f97c0147b fix a bug about Json::Path 2016-09-07 19:56:19 +08:00
Alexander Gazarov
52cfe5ae88 Replaced the template-based solution for avoiding calls to localeconv() with a macro-based one (fixes #527) 2016-09-06 14:41:13 +03:00
Christopher Dunn
a304d61a7b 1.7.5 <- 1.7.4 1.7.5 2016-09-01 02:45:08 -05:00
Christopher Dunn
0a97e38ea5 Merge pull request #523 from prezi/fix-android-lconv
Workaround for missing lconv::decimal_point on android
2016-09-01 02:36:34 -05:00
Gida Pataki
894e78bff1 Workaround for missing lconv::decimal_point on android 2016-08-26 23:30:18 +02:00
Christopher Dunn
126bdc2b05 Reject extra chars if strictRoot
resolves #511
2016-08-21 20:32:16 -05:00
Christopher Dunn
094a7d8564 Fix locale for decimal points
resolves #514
2016-08-21 20:13:58 -05:00
Christopher Dunn
b9afdf190d Use int64_t for 64bit ints
resolves #509
2016-08-21 19:58:43 -05:00
Christopher Dunn
80a82ea269 Optional space after comma
resolves #513
2016-08-21 16:35:19 -05:00
Christopher Dunn
f78f685bab Remove needless if.
resolves #516
2016-08-21 16:31:14 -05:00
Christopher Dunn
7d8eddb98c Merge pull request #519 from open-source-parsers/fix-517
Avoid null for stringValue
2016-08-21 16:30:28 -05:00
Christopher Dunn
7e0571b444 Avoid null for stringValue
fixes #517
2016-08-21 16:25:29 -05:00
Christopher Dunn
b14c8c1423 Merge pull request #502 from open-source-parsers/null-object
Allow dtor for nullSingleton
2016-07-20 22:28:44 -07:00
Christopher Dunn
b299d3581f Allow dtor for nullSingleton
re #488 and #490
2016-07-20 11:31:41 -07:00
Christopher Dunn
48d2a69d47 1.7.4 <- 1.7.3 1.7.4 2016-07-09 13:27:28 -05:00
Christopher Dunn
772e257fc9 Merge pull request #493 from zorun/master
Fix compilation errors for downstream projects caused by incorrect pkconfig paths
2016-07-08 17:02:30 -05:00
Baptiste Jonglez
101fcf0806 Fix compilation errors for downstream projects caused by incorrect pkgconfig paths
Recent commit 911e2b0fea ("By default use <prefix> relative paths when
installing") introduced relative install paths in CMake.  But this
interacts badly with commit e6f1cffdd3 from a year ago: now, the paths in
`pkgconfig/jsoncpp.pc` are relative, which is incorrect.

Before 911e2b0fea (1.7.2 on Archlinux), this was correct:

    $ head -4 /usr/lib/pkgconfig/jsoncpp.pc
    prefix=/usr
    exec_prefix=${prefix}
    libdir=/usr/lib
    includedir=/usr/include

After 911e2b0fea (1.7.3 on Archlinux), this is now incorrect:

    $ head -4 /usr/lib/pkgconfig/jsoncpp.pc
    prefix=/usr
    exec_prefix=${prefix}
    libdir=lib
    includedir=include

This change causes hard-to-debug compilation errors for projects that
depend on jsoncpp, for instance:

    CXXLD    libring.la
    /tmp/ring-daemon/src/ring-daemon/src/../libtool: line 7486: cd: lib: No such file or directory
    libtool:   error: cannot determine absolute directory name of 'lib'
    make[3]: *** [Makefile:679: libring.la] Error 1

This is because jsoncpp contributes `-Llib -ljsoncpp` to the LDFLAGS, via
the pkg-config machinery.  Notice the relative path in `-Llib`.

To fix this, simply revert commit e6f1cffdd3 ("Fix custom includedir &
libdir substitution in pkg-config").  The change in 911e2b0fea should have
the same effect.

See #279, #470 for references.
2016-07-08 00:46:04 +02:00
Christopher Dunn
7e4df50d17 Merge pull request #490 from open-source-parsers/null-singleton
Use a Myers Singleton for null
1.7.3
2016-06-27 00:12:23 -05:00
Christopher Dunn
318f30357c 1.7.3 2016-06-26 19:40:43 -05:00
Christopher Dunn
0f288aecdd Use a Myers Singleton for null
Avoid some static initialization problems.

From @marklakata
See #488
2016-06-26 19:36:40 -05:00
Christopher Dunn
e0f9aab0bf Make internal func anon
fixes #489
2016-06-26 17:54:15 -05:00
Christopher Dunn
43203f1d09 Merge pull request #478 from quantumsteve/msvc_override
Use override keyword with Visual Studio.
2016-05-28 10:01:46 -05:00
Steven Hahn
55176b2bdd Use override keyword with Visual Studio. 2016-05-25 18:29:34 -04:00
Christopher Dunn
4356d9bba1 Merge pull request #474 from cdunn2001/fix-warning
Fix some warnings
2016-05-15 23:35:02 -05:00
Christopher Dunn
ea4af18317 Fix int->char conv warn
resolves #473
2016-05-15 23:13:56 -05:00
Christopher Dunn
b999616df8 fix warning 2016-05-15 23:13:47 -05:00
Christopher Dunn
660307d357 Merge pull request #470 from aboseley/relative_install_paths
By default use <prefix> relative paths when installing
2016-05-05 13:59:20 -05:00
Adam Boseley
911e2b0fea By default use <prefix> relative paths when installing
This allows the config file to keep working
when it is installed to a non-standard location
from a make DESTDIR=<location> install
2016-05-04 23:41:18 -07:00