Bug 1375957 - Bump the version of jsoncpp draft
authorSylvestre Ledru <sledru@mozilla.com>
Fri, 23 Jun 2017 21:21:17 +0200
changeset 599930 17ef4489d642902e971a9b078c4c1faffae7c47e
parent 586294 908bcf253a67ab3e5c0a37e2298156c5d63fd0d9
child 601264 252ecf4a793af2ab723ffb4f28043269fc940774
child 601298 1460d1d5ec41154f6cd5a734b52abee47b0d2cfa
child 601304 803db532d4667ace82236c76260b4ccc56e51861
child 602135 1e5a102c8214313e571e599d805a1d848df1be12
push id65629
push userbmo:sledru@mozilla.com
push dateFri, 23 Jun 2017 19:21:42 +0000
bugs1375957
milestone55.0a1
Bug 1375957 - Bump the version of jsoncpp MozReview-Commit-ID: IwdWn9R4GRz
toolkit/components/jsoncpp/AUTHORS
toolkit/components/jsoncpp/GIT-INFO
toolkit/components/jsoncpp/LICENSE
toolkit/components/jsoncpp/README.md
toolkit/components/jsoncpp/include/json/allocator.h
toolkit/components/jsoncpp/include/json/config.h
toolkit/components/jsoncpp/include/json/features.h
toolkit/components/jsoncpp/include/json/reader.h
toolkit/components/jsoncpp/include/json/value.h
toolkit/components/jsoncpp/include/json/version.h
toolkit/components/jsoncpp/include/json/writer.h
toolkit/components/jsoncpp/src/lib_json/json_reader.cpp
toolkit/components/jsoncpp/src/lib_json/json_tool.h
toolkit/components/jsoncpp/src/lib_json/json_value.cpp
toolkit/components/jsoncpp/src/lib_json/json_writer.cpp
--- a/toolkit/components/jsoncpp/AUTHORS
+++ b/toolkit/components/jsoncpp/AUTHORS
@@ -1,1 +1,111 @@
 Baptiste Lepilleur <blep@users.sourceforge.net>
+
+Aaron Jacobs <aaronjjacobs@gmail.com>
+Aaron Jacobs <jacobsa@google.com>
+Adam Boseley <ABoseley@agjunction.com>
+Adam Boseley <adam.boseley@gmail.com>
+Aleksandr Derbenev <13alexac@gmail.com>
+Alexander Gazarov <DrMetallius@users.noreply.github.com>
+Alexander V. Brezgin <abrezgin@appliedtech.ru>
+Alexandr Brezgin <albrezgin@mail.ru>
+Alexey Kruchinin <alexey@mopals.com>
+Anton Indrawan <anton.indrawan@gmail.com>
+Baptiste Jonglez <git@bitsofnetworks.org>
+Baptiste Lepilleur <baptiste.lepilleur@gmail.com>
+Baruch Siach <baruch@tkos.co.il>
+Ben Boeckel <mathstuf@gmail.com>
+Benjamin Knecht <bknecht@logitech.com>
+Bernd Kuhls <bernd.kuhls@t-online.de>
+Billy Donahue <billydonahue@google.com>
+Braden McDorman <bmcdorman@gmail.com>
+Brandon Myers <bmyers1788@gmail.com>
+Brendan Drew <brendan.drew@daqri.com>
+chason <cxchao802@gmail.com>
+Chris Gilling <cgilling@iparadigms.com>
+Christopher Dawes <christopher.dawes.1981@googlemail.com>
+Christopher Dunn <cdunn2001@gmail.com>
+Chuck Atkins <chuck.atkins@kitware.com>
+Cody P Schafer <dev@codyps.com>
+Connor Manning <connor@hobu.co>
+Cory Quammen <cory.quammen@kitware.com>
+Cristóvão B da Cruz e Silva <CrisXed@gmail.com>
+Daniel Krügler <daniel.kruegler@gmail.com>
+Dani-Hub <daniel.kruegler@googlemail.com>
+Dan Liu <gzliudan>
+datadiode <datadiode@users.noreply.github.com>
+datadiode <jochen.neubeck@vodafone.de>
+David Seifert <soap@gentoo.org>
+David West <david-west@idexx.com>
+dawesc <chris.dawes@eftlab.co.uk>
+Dmitry Marakasov <amdmi3@amdmi3.ru>
+dominicpezzuto <dom@dompezzuto.com>
+Don Milham <dmilham@gmail.com>
+drgler <daniel.kruegler@gmail.com>
+ds283 <D.Seery@sussex.ac.uk>
+Egor Tensin <Egor.Tensin@gmail.com>
+eightnoteight <mr.eightnoteight@gmail.com>
+Evince <baneyue@gmail.com>
+filipjs <filipjs@users.noreply.github.com>
+findblar <ft@finbarr.ca>
+Florian Meier <florian.meier@koalo.de>
+Gaëtan Lehmann <gaetan.lehmann@gmail.com>
+Gaurav <g.gupta@samsung.com>
+Gergely Nagy <ngg@ngg.hu>
+Gida Pataki <gida.pataki@prezi.com>
+I3ck <buckmartin@buckmartin.de>
+Iñaki Baz Castillo <ibc@aliax.net>
+Jacco <jacco@geul.net>
+Jean-Christophe Fillion-Robin <jchris.fillionr@kitware.com>
+Jonas Platte <mail@jonasplatte.de>
+Jörg Krause <joerg.krause@embedded.rocks>
+Keith Lea <keith@whamcitylights.com>
+Kevin Grant <kbradleygrant@gmail.com>
+Kirill V. Lyadvinsky <jia3ep@gmail.com>
+Kirill V. Lyadvinsky <mail@codeatcpp.com>
+Kobi Gurkan <kobigurk@gmail.com>
+Magnus Bjerke Vik <mbvett@gmail.com>
+Malay Shah <malays@users.sourceforge.net>
+Mara Kim <hacker.root@gmail.com>
+Marek Kotewicz <marek.kotewicz@gmail.com>
+Mark Lakata <mark@lakata.org>
+Mark Zeren <mzeren@vmware.com>
+Martin Buck <buckmartin@buckmartin.de>
+Martyn Gigg <martyn.gigg@gmail.com>
+Mattes D <github@xoft.cz>
+Matthias Loy <matthias.loy@hbm.com>
+Merlyn Morgan-Graham <kavika@gmail.com>
+Michael Shields <mshields@google.com>
+Michał Górny <mgorny@gentoo.org>
+Mike Naberezny <mike@naberezny.com>
+mloy <matthias.loy@googlemail.com>
+Motti <lanzkron@gmail.com>
+nnkur <nnkur@mail.ru>
+Omkar Wagh <owagh@owaghlinux.ny.tower-research.com>
+paulo <paulobrizolara@users.noreply.github.com>
+pavel.pimenov <pavel.pimenov@gmail.com>
+Paweł Bylica <chfast@gmail.com>
+Péricles Lopes Machado <pericles.raskolnikoff@gmail.com>
+Peter Spiess-Knafl <psk@autistici.org>
+pffang <pffang@vip.qq.com>
+Rémi Verschelde <remi@verschelde.fr>
+renu555 <renu.tyagi@samsung.com>
+Robert Dailey <rcdailey@gmail.com>
+Sam Clegg <sbc@chromium.org>
+selaselah <selah@outlook.com>
+Sergiy80 <sil2004@gmail.com>
+sergzub <sergzub@gmail.com>
+Stefan Schweter <stefan@schweter.it>
+Steffen Kieß <Steffen.Kiess@ipvs.uni-stuttgart.de>
+Steven Hahn <hahnse@ornl.gov>
+Stuart Eichert <stuart@fivemicro.com>
+SuperManitu <supermanitu@gmail.com>
+Techwolf <dring@g33kworld.net>
+Tengiz Sharafiev <btolfa+github@gmail.com>
+Tomasz Maciejewski <tmaciejewsk@gmail.com>
+Vicente Olivert Riera <Vincent.Riera@imgtec.com>
+xiaoyur347 <xiaoyur347@gmail.com>
+ycqiu <429148848@qq.com>
+yiqiju <fred_ju@selinc.com>
+Yu Xiaolei <dreifachstein@gmail.com>
+
+Google Inc.
--- a/toolkit/components/jsoncpp/GIT-INFO
+++ b/toolkit/components/jsoncpp/GIT-INFO
@@ -1,1 +1,2 @@
-a304d61a7b3ee2700b52abc0b28412aabee782e5
+56efb6ba83f7c8d63d81e25b42b0367c48aa5f3c
+
--- a/toolkit/components/jsoncpp/LICENSE
+++ b/toolkit/components/jsoncpp/LICENSE
@@ -1,34 +1,34 @@
 The JsonCpp library's source code, including accompanying documentation, 
 tests and demonstration applications, are licensed under the following
 conditions...
 
-The author (Baptiste Lepilleur) explicitly disclaims copyright in all 
+The JsonCpp Authors explicitly disclaim copyright in all 
 jurisdictions which recognize such a disclaimer. In such jurisdictions, 
 this software is released into the Public Domain.
 
 In jurisdictions which do not recognize Public Domain property (e.g. Germany as of
-2010), this software is Copyright (c) 2007-2010 by Baptiste Lepilleur, and is
+2010), this software is Copyright (c) 2007-2010 by The JsonCpp Authors, and is
 released under the terms of the MIT License (see below).
 
 In jurisdictions which recognize Public Domain property, the user of this 
 software may choose to accept it either as 1) Public Domain, 2) under the 
 conditions of the MIT License (see below), or 3) under the terms of dual 
 Public Domain/MIT License conditions described here, as they choose.
 
 The MIT License is about as close to Public Domain as a license can get, and is
 described in clear, concise terms at:
 
    http://en.wikipedia.org/wiki/MIT_License
    
 The full text of the MIT License follows:
 
 ========================================================================
-Copyright (c) 2007-2010 Baptiste Lepilleur
+Copyright (c) 2007-2010 The JsonCpp Authors
 
 Permission is hereby granted, free of charge, to any person
 obtaining a copy of this software and associated documentation
 files (the "Software"), to deal in the Software without
 restriction, including without limitation the rights to use, copy,
 modify, merge, publish, distribute, sublicense, and/or sell copies
 of the Software, and to permit persons to whom the Software is
 furnished to do so, subject to the following conditions:
--- a/toolkit/components/jsoncpp/README.md
+++ b/toolkit/components/jsoncpp/README.md
@@ -1,89 +1,135 @@
-Introduction
-------------
+# JsonCpp
+
+[![badge](https://img.shields.io/badge/conan.io-jsoncpp%2F1.8.0-green.svg?logo=data:image/png;base64%2CiVBORw0KGgoAAAANSUhEUgAAAA4AAAAOCAMAAAAolt3jAAAA1VBMVEUAAABhlctjlstkl8tlmMtlmMxlmcxmmcxnmsxpnMxpnM1qnc1sn85voM91oM11oc1xotB2oc56pNF6pNJ2ptJ8ptJ8ptN9ptN8p9N5qNJ9p9N9p9R8qtOBqdSAqtOAqtR%2BrNSCrNJ/rdWDrNWCsNWCsNaJs9eLs9iRvNuVvdyVv9yXwd2Zwt6axN6dxt%2Bfx%2BChyeGiyuGjyuCjyuGly%2BGlzOKmzOGozuKoz%2BKqz%2BOq0OOv1OWw1OWw1eWx1eWy1uay1%2Baz1%2Baz1%2Bez2Oe02Oe12ee22ujUGwH3AAAAAXRSTlMAQObYZgAAAAFiS0dEAIgFHUgAAAAJcEhZcwAACxMAAAsTAQCanBgAAAAHdElNRQfgBQkREyOxFIh/AAAAiklEQVQI12NgAAMbOwY4sLZ2NtQ1coVKWNvoc/Eq8XDr2wB5Ig62ekza9vaOqpK2TpoMzOxaFtwqZua2Bm4makIM7OzMAjoaCqYuxooSUqJALjs7o4yVpbowvzSUy87KqSwmxQfnsrPISyFzWeWAXCkpMaBVIC4bmCsOdgiUKwh3JojLgAQ4ZCE0AMm2D29tZwe6AAAAAElFTkSuQmCC)](http://www.conan.io/source/jsoncpp/1.8.0/theirix/ci)
 
 [JSON][json-org] is a lightweight data-interchange format. It can represent
 numbers, strings, ordered sequences of values, and collections of name/value
 pairs.
 
 [json-org]: http://json.org/
 
-[JsonCpp][] is a C++ library that allows manipulating JSON values, including
+JsonCpp is a C++ library that allows manipulating JSON values, including
 serialization and deserialization to and from strings. It can also preserve
 existing comment in unserialization/serialization steps, making it a convenient
 format to store user input files.
 
-[JsonCpp]: http://open-source-parsers.github.io/jsoncpp-docs/doxygen/index.html
+
+## Documentation
+
+[JsonCpp documentation][JsonCpp-documentation] is generated using [Doxygen][].
+
+[JsonCpp-documentation]: http://open-source-parsers.github.io/jsoncpp-docs/doxygen/index.html
+[Doxygen]: http://www.doxygen.org
+
 
 ## A note on backward-compatibility
+
 * `1.y.z` is built with C++11.
 * `0.y.z` can be used with older compilers.
 * Major versions maintain binary-compatibility.
 
-# Using JsonCpp in your project
------------------------------
+
+## Using JsonCpp in your project
+
 The recommended approach to integrating JsonCpp in your project is to include
-the [amalgamated source](#generating-amalgamated-source-and-header) (a single 
-`.cpp` file and two `.h` files) in your project, and compile and build as you 
+the [amalgamated source](#generating-amalgamated-source-and-header) (a single
+`.cpp` file and two `.h` files) in your project, and compile and build as you
 would any other source file. This ensures consistency of compilation flags and
-ABI compatibility, issues which arise when building shared or static 
+ABI compatibility, issues which arise when building shared or static
 libraries. See the next section for instructions.
-  
-The `include/` should be added to your compiler include path. Jsoncpp headers
+
+The `include/` should be added to your compiler include path. JsonCpp headers
 should be included as follow:
 
     #include <json/json.h>
 
-If JsonCpp was built as a dynamic library on Windows, then your project needs to
-define the macro `JSON_DLL`.
+If JsonCpp was built as a dynamic library on Windows, then your project needs to define the macro `JSON_DLL`.
 
-Generating amalgamated source and header
-----------------------------------------
+### Generating amalgamated source and header
+
 JsonCpp is provided with a script to generate a single header and a single
 source file to ease inclusion into an existing project. The amalgamated source
 can be generated at any time by running the following command from the
 top-directory (this requires Python 2.6):
 
     python amalgamate.py
 
 It is possible to specify header name. See the `-h` option for detail.
 
 By default, the following files are generated:
+
 * `dist/jsoncpp.cpp`: source file that needs to be added to your project.
 * `dist/json/json.h`: corresponding header file for use in your project. It is
   equivalent to including `json/json.h` in non-amalgamated source. This header
   only depends on standard headers.
 * `dist/json/json-forwards.h`: header that provides forward declaration of all
   JsonCpp types.
 
 The amalgamated sources are generated by concatenating JsonCpp source in the
-correct order and defining the macro `JSON_IS_AMALGAMATION` to prevent inclusion
-of other headers.
+correct order and defining the macro `JSON_IS_AMALGAMATION` to prevent inclusion of other headers.
+
+
+## Contributing to JsonCpp
+
+### Building and testing with Conan
+
+[Conan](https://www.conan.io/#/) is an open source package manager intended for C/C++ projects.
+It is cross platform and build system agnostic.
 
-# Contributing to JsonCpp
+Conan requires Python for running, and can be installed using pip:
+
+    pip install conan
+
+ Detailed instructions can be found on [conan docs](http://docs.conan.io/en/latest/).
+
+For build jsoncpp with conan, you need to create a [conanfile.txt](http://docs.conan.io/en/latest/reference/conanfile_txt.html) or a [conanfile.py](http://docs.conan.io/en/latest/reference/conanfile.html). The first is simpler, but the second is more flexible.
+
+This is a sample conanfile.txt:
 
-Building and testing with CMake
--------------------------------
-[CMake][] is a C++ Makefiles/Solution generator. It is usually available on most
-Linux system as package. On Ubuntu:
+```
+[requires]
+jsoncpp/1.8.0@theirix/ci
+
+[generators]
+cmake
+```
+
+**Note**: cmake is not required, you can use other [integrations](http://docs.conan.io/en/latest/integrations.html). Or you can set the appropriate environment variables, using [virtualenv generators](http://docs.conan.io/en/latest/mastering/virtualenv.html).
+
+Then run the following command from the conanfile directory:
+
+    conan install --build missing
+
+This will try to download the appropriate package for your settings (OS, compiler, architecture) from the [recipe packages](https://www.conan.io/source/jsoncpp/1.8.0/theirix/ci). If it is not found, the package will be built.
+
+**Note**: you do not need to install cmake to build jsoncpp using conan, because the recipe will download it automatically.
+
+If you need, you can customize the jsoncpp recipe. Just clone/fork [it from github](https://github.com/theirix/conan-jsoncpp/).
+
+See [integrations instructions](http://docs.conan.io/en/latest/integrations.html) for how to use your build system with conan.
+
+### Building and testing with CMake
+
+[CMake][] is a C++ Makefiles/Solution generator. It is usually available on most Linux system as package. On Ubuntu:
 
     sudo apt-get install cmake
 
 [CMake]: http://www.cmake.org
 
 Note that Python is also required to run the JSON reader/writer tests. If
 missing, the build will skip running those tests.
 
 When running CMake, a few parameters are required:
 
-* a build directory where the makefiles/solution are generated. It is also used
+* A build directory where the makefiles/solution are generated. It is also used
   to store objects, libraries and executables files.
-* the generator to use: makefiles or Visual Studio solution? What version or
-  Visual Studio, 32 or 64 bits solution? 
+* The generator to use: makefiles or Visual Studio solution? What version or
+  Visual Studio, 32 or 64 bits solution?
 
 Steps for generating solution/makefiles using `cmake-gui`:
 
 * Make "source code" point to the source directory.
 * Make "where to build the binary" point to the directory to use for the build.
 * Click on the "Grouped" check box.
 * Review JsonCpp build options (tick `BUILD_SHARED_LIBS` to build as a
   dynamic library).
@@ -92,26 +138,30 @@ Steps for generating solution/makefiles 
 
 Alternatively, from the command-line on Unix in the source directory:
 
     mkdir -p build/debug
     cd build/debug
     cmake -DCMAKE_BUILD_TYPE=debug -DBUILD_STATIC_LIBS=ON -DBUILD_SHARED_LIBS=OFF -DARCHIVE_INSTALL_DIR=. -G "Unix Makefiles" ../..
     make
 
+For a good pkg-config file, add:
+
+    -DCMAKE_INSTALL_INCLUDEDIR=include/jsoncpp
+
 Running `cmake -h` will display the list of available generators (passed using
 the `-G` option).
 
 By default CMake hides compilation commands. This can be modified by specifying
 `-DCMAKE_VERBOSE_MAKEFILE=true` when generating makefiles.
 
-Building and testing with SCons
--------------------------------
-**Note:** The SCons-based build system is deprecated. Please use CMake; see the
-section above.
+### Building and testing with SCons
+
+**Note:** The SCons-based build system is deprecated. Please use CMake (see the
+section above).
 
 JsonCpp can use [Scons][] as a build system. Note that SCons requires Python to
 be installed.
 
 [SCons]: http://www.scons.org/
 
 Invoke SCons as follows:
 
@@ -128,87 +178,87 @@ where `$PLATFORM` may be one of:
 * `msvc80`: Microsoft Visual Studio 2005
 * `msvc90`: Microsoft Visual Studio 2008
 * `linux-gcc`: Gnu C++ (linux, also reported to work for Mac OS X)
 
 If you are building with Microsoft Visual Studio 2008, you need to set up the
 environment by running `vcvars32.bat` (e.g. MSVC 2008 command prompt) before
 running SCons.
 
-## Running the tests manually
+### Running the tests manually
+
 You need to run tests manually only if you are troubleshooting an issue.
 
 In the instructions below, replace `path/to/jsontest` with the path of the
 `jsontest` executable that was compiled on your platform.
 
     cd test
     # This will run the Reader/Writer tests
     python runjsontests.py path/to/jsontest
-    
+
     # This will run the Reader/Writer tests, using JSONChecker test suite
     # (http://www.json.org/JSON_checker/).
     # Notes: not all tests pass: JsonCpp is too lenient (for example,
     # it allows an integer to start with '0'). The goal is to improve
     # strict mode parsing to get all tests to pass.
     python runjsontests.py --with-json-checker path/to/jsontest
-    
+
     # This will run the unit tests (mostly Value)
     python rununittests.py path/to/test_lib_json
-    
+
     # You can run the tests using valgrind:
     python rununittests.py --valgrind path/to/test_lib_json
 
-## Running the tests using scons
+### Running the tests using SCons
+
 Note that tests can be run using SCons using the `check` target:
 
     scons platform=$PLATFORM check
 
-Building the documentation
---------------------------
+### Building the documentation
+
 Run the Python script `doxybuild.py` from the top directory:
 
     python doxybuild.py --doxygen=$(which doxygen) --open --with-dot
 
 See `doxybuild.py --help` for options.
 
-Adding a reader/writer test
----------------------------
+### Adding a reader/writer test
+
 To add a test, you need to create two files in test/data:
 
 * a `TESTNAME.json` file, that contains the input document in JSON format.
 * a `TESTNAME.expected` file, that contains a flatened representation of the
   input document.
 
 The `TESTNAME.expected` file format is as follows:
 
-* each line represents a JSON element of the element tree represented by the
+* Each line represents a JSON element of the element tree represented by the
   input document.
-* each line has two parts: the path to access the element separated from the
+* Each line has two parts: the path to access the element separated from the
   element value by `=`. Array and object values are always empty (i.e.
   represented by either `[]` or `{}`).
-* element path: `.` represents the root element, and is used to separate object
+* Element path `.` represents the root element, and is used to separate object
   members. `[N]` is used to specify the value of an array element at index `N`.
 
-See the examples `test_complex_01.json` and `test_complex_01.expected` to better
-understand element paths.
+See the examples `test_complex_01.json` and `test_complex_01.expected` to better understand element paths.
 
-Understanding reader/writer test output
----------------------------------------
-When a test is run, output files are generated beside the input test files.
-Below is a short description of the content of each file:
+### Understanding reader/writer test output
+
+When a test is run, output files are generated beside the input test files. Below is a short description of the content of each file:
 
 * `test_complex_01.json`: input JSON document.
 * `test_complex_01.expected`: flattened JSON element tree used to check if
   parsing was corrected.
 * `test_complex_01.actual`: flattened JSON element tree produced by `jsontest`
   from reading `test_complex_01.json`.
 * `test_complex_01.rewrite`: JSON document written by `jsontest` using the
   `Json::Value` parsed from `test_complex_01.json` and serialized using
   `Json::StyledWritter`.
 * `test_complex_01.actual-rewrite`: flattened JSON element tree produced by
   `jsontest` from reading `test_complex_01.rewrite`.
 * `test_complex_01.process-output`: `jsontest` output, typically useful for
   understanding parsing errors.
 
-License
--------
+## License
+
 See the `LICENSE` file for details. In summary, JsonCpp is licensed under the
 MIT license, or public domain if desired and recognized in your jurisdiction.
--- a/toolkit/components/jsoncpp/include/json/allocator.h
+++ b/toolkit/components/jsoncpp/include/json/allocator.h
@@ -4,16 +4,18 @@
 // See file LICENSE for detail or copy at http://jsoncpp.sourceforge.net/LICENSE
 
 #ifndef CPPTL_JSON_ALLOCATOR_H_INCLUDED
 #define CPPTL_JSON_ALLOCATOR_H_INCLUDED
 
 #include <cstring>
 #include <memory>
 
+#pragma pack(push, 8)
+
 namespace Json {
 template<typename T>
 class SecureAllocator {
 	public:
 		// Type definitions
 		using value_type      = T;
 		using pointer         = T*;
 		using const_pointer   = const T*;
@@ -86,9 +88,11 @@ bool operator==(const SecureAllocator<T>
 
 template<typename T, typename U>
 bool operator!=(const SecureAllocator<T>&, const SecureAllocator<U>&) {
 	return false;
 }
 
 } //namespace Json
 
+#pragma pack(pop)
+
 #endif // CPPTL_JSON_ALLOCATOR_H_INCLUDED
--- a/toolkit/components/jsoncpp/include/json/config.h
+++ b/toolkit/components/jsoncpp/include/json/config.h
@@ -78,20 +78,26 @@
 
 #endif // defined(_MSC_VER)
 
 // In c++11 the override keyword allows you to explicity define that a function
 // is intended to override the base-class version.  This makes the code more
 // managable and fixes a set of common hard-to-find bugs.
 #if __cplusplus >= 201103L
 # define JSONCPP_OVERRIDE override
-#elif defined(_MSC_VER) && _MSC_VER > 1600
+# define JSONCPP_NOEXCEPT noexcept
+#elif defined(_MSC_VER) && _MSC_VER > 1600 && _MSC_VER < 1900
 # define JSONCPP_OVERRIDE override
+# define JSONCPP_NOEXCEPT throw()
+#elif defined(_MSC_VER) && _MSC_VER >= 1900
+# define JSONCPP_OVERRIDE override
+# define JSONCPP_NOEXCEPT noexcept
 #else
 # define JSONCPP_OVERRIDE
+# define JSONCPP_NOEXCEPT throw()
 #endif
 
 #ifndef JSON_HAS_RVALUE_REFERENCES
 
 #if defined(_MSC_VER) && _MSC_VER >= 1600 // MSVC >= 2010
 #define JSON_HAS_RVALUE_REFERENCES 1
 #endif // MSVC >= 2010
 
--- a/toolkit/components/jsoncpp/include/json/features.h
+++ b/toolkit/components/jsoncpp/include/json/features.h
@@ -5,16 +5,18 @@
 
 #ifndef CPPTL_JSON_FEATURES_H_INCLUDED
 #define CPPTL_JSON_FEATURES_H_INCLUDED
 
 #if !defined(JSON_IS_AMALGAMATION)
 #include "forwards.h"
 #endif // if !defined(JSON_IS_AMALGAMATION)
 
+#pragma pack(push, 8)
+
 namespace Json {
 
 /** \brief Configuration passed to reader and writer.
  * This configuration object can be used to force the Reader or Writer
  * to behave in a standard conforming way.
  */
 class JSON_API Features {
 public:
@@ -49,9 +51,11 @@ public:
   bool allowDroppedNullPlaceholders_;
 
   /// \c true if numeric object key are allowed. Default: \c false.
   bool allowNumericKeys_;
 };
 
 } // namespace Json
 
+#pragma pack(pop)
+
 #endif // CPPTL_JSON_FEATURES_H_INCLUDED
--- a/toolkit/components/jsoncpp/include/json/reader.h
+++ b/toolkit/components/jsoncpp/include/json/reader.h
@@ -18,16 +18,18 @@
 
 // Disable warning C4251: <data member>: <type> needs to have dll-interface to
 // be used by...
 #if defined(JSONCPP_DISABLE_DLL_INTERFACE_WARNING)
 #pragma warning(push)
 #pragma warning(disable : 4251)
 #endif // if defined(JSONCPP_DISABLE_DLL_INTERFACE_WARNING)
 
+#pragma pack(push, 8)
+
 namespace Json {
 
 /** \brief Unserialize a <a HREF="http://www.json.org">JSON</a> document into a
  *Value.
  *
  * \deprecated Use CharReader and CharReaderBuilder.
  */
 class JSON_API Reader {
@@ -392,13 +394,15 @@ bool JSON_API parseFromStream(
  \endverbatim
  \throw std::exception on parse error.
  \see Json::operator<<()
 */
 JSON_API JSONCPP_ISTREAM& operator>>(JSONCPP_ISTREAM&, Value&);
 
 } // namespace Json
 
+#pragma pack(pop)
+
 #if defined(JSONCPP_DISABLE_DLL_INTERFACE_WARNING)
 #pragma warning(pop)
 #endif // if defined(JSONCPP_DISABLE_DLL_INTERFACE_WARNING)
 
 #endif // CPPTL_JSON_READER_H_INCLUDED
--- a/toolkit/components/jsoncpp/include/json/value.h
+++ b/toolkit/components/jsoncpp/include/json/value.h
@@ -37,29 +37,31 @@
 
 // Disable warning C4251: <data member>: <type> needs to have dll-interface to
 // be used by...
 #if defined(JSONCPP_DISABLE_DLL_INTERFACE_WARNING)
 #pragma warning(push)
 #pragma warning(disable : 4251)
 #endif // if defined(JSONCPP_DISABLE_DLL_INTERFACE_WARNING)
 
+#pragma pack(push, 8)
+
 /** \brief JSON (JavaScript Object Notation).
  */
 namespace Json {
 
 /** Base class for all exceptions we throw.
  *
  * We use nothing but these internally. Of course, STL can throw others.
  */
 class JSON_API Exception : public std::exception {
 public:
   Exception(JSONCPP_STRING const& msg);
-  ~Exception() throw() JSONCPP_OVERRIDE;
-  char const* what() const throw() JSONCPP_OVERRIDE;
+  ~Exception() JSONCPP_NOEXCEPT JSONCPP_OVERRIDE;
+  char const* what() const JSONCPP_NOEXCEPT JSONCPP_OVERRIDE;
 protected:
   JSONCPP_STRING msg_;
 };
 
 /** Exceptions which the user cannot easily avoid.
  *
  * E.g. out-of-memory (when we use malloc), stack-overflow, malicious input
  * 
@@ -854,14 +856,15 @@ public:
 
 
 namespace std {
 /// Specialize std::swap() for Json::Value.
 template<>
 inline void swap(Json::Value& a, Json::Value& b) { a.swap(b); }
 }
 
+#pragma pack(pop)
 
 #if defined(JSONCPP_DISABLE_DLL_INTERFACE_WARNING)
 #pragma warning(pop)
 #endif // if defined(JSONCPP_DISABLE_DLL_INTERFACE_WARNING)
 
 #endif // CPPTL_JSON_H_INCLUDED
--- a/toolkit/components/jsoncpp/include/json/version.h
+++ b/toolkit/components/jsoncpp/include/json/version.h
@@ -1,17 +1,17 @@
 // DO NOT EDIT. This file (and "version") is generated by CMake.
 // Run CMake configure step to update it.
 #ifndef JSON_VERSION_H_INCLUDED
 # define JSON_VERSION_H_INCLUDED
 
-# define JSONCPP_VERSION_STRING "1.7.7"
+# define JSONCPP_VERSION_STRING "1.8.0"
 # define JSONCPP_VERSION_MAJOR 1
-# define JSONCPP_VERSION_MINOR 7
-# define JSONCPP_VERSION_PATCH 7
+# define JSONCPP_VERSION_MINOR 8
+# define JSONCPP_VERSION_PATCH 0
 # define JSONCPP_VERSION_QUALIFIER
 # define JSONCPP_VERSION_HEXA ((JSONCPP_VERSION_MAJOR << 24) | (JSONCPP_VERSION_MINOR << 16) | (JSONCPP_VERSION_PATCH << 8))
 
 #ifdef JSONCPP_USING_SECURE_MEMORY
 #undef JSONCPP_USING_SECURE_MEMORY
 #endif
 #define JSONCPP_USING_SECURE_MEMORY 0
 // If non-zero, the library zeroes any memory that it has allocated before
--- a/toolkit/components/jsoncpp/include/json/writer.h
+++ b/toolkit/components/jsoncpp/include/json/writer.h
@@ -15,16 +15,18 @@
 
 // Disable warning C4251: <data member>: <type> needs to have dll-interface to
 // be used by...
 #if defined(JSONCPP_DISABLE_DLL_INTERFACE_WARNING)
 #pragma warning(push)
 #pragma warning(disable : 4251)
 #endif // if defined(JSONCPP_DISABLE_DLL_INTERFACE_WARNING)
 
+#pragma pack(push, 8)
+
 namespace Json {
 
 class Value;
 
 /**
 
 Usage:
 \code
@@ -319,13 +321,15 @@ JSONCPP_STRING JSON_API valueToString(bo
 JSONCPP_STRING JSON_API valueToQuotedString(const char* value);
 
 /// \brief Output using the StyledStreamWriter.
 /// \see Json::operator>>()
 JSON_API JSONCPP_OSTREAM& operator<<(JSONCPP_OSTREAM&, const Value& root);
 
 } // namespace Json
 
+#pragma pack(pop)
+
 #if defined(JSONCPP_DISABLE_DLL_INTERFACE_WARNING)
 #pragma warning(pop)
 #endif // if defined(JSONCPP_DISABLE_DLL_INTERFACE_WARNING)
 
 #endif // JSON_WRITER_H_INCLUDED
--- a/toolkit/components/jsoncpp/src/lib_json/json_reader.cpp
+++ b/toolkit/components/jsoncpp/src/lib_json/json_reader.cpp
@@ -1,9 +1,10 @@
 // Copyright 2007-2011 Baptiste Lepilleur
+// Copyright (C) 2016 InfoTeCS JSC. All rights reserved.
 // Distributed under MIT license, or public domain if desired and
 // recognized in your jurisdiction.
 // See file LICENSE for detail or copy at http://jsoncpp.sourceforge.net/LICENSE
 
 #if !defined(JSON_IS_AMALGAMATION)
 #include <json/assertions.h>
 #include <json/reader.h>
 #include <json/value.h>
@@ -39,18 +40,22 @@
 #define sscanf std::sscanf
 #endif
 
 #if defined(_MSC_VER) && _MSC_VER >= 1400 // VC++ 8.0
 // Disable warning about strdup being deprecated.
 #pragma warning(disable : 4996)
 #endif
 
-static int const stackLimit_g = 1000;
-static int       stackDepth_g = 0;  // see readValue()
+// Define JSONCPP_DEPRECATED_STACK_LIMIT as an appropriate integer at compile time to change the stack limit
+#if !defined(JSONCPP_DEPRECATED_STACK_LIMIT)
+#define JSONCPP_DEPRECATED_STACK_LIMIT 1000
+#endif
+
+static size_t const stackLimit_g = JSONCPP_DEPRECATED_STACK_LIMIT; // see readValue()
 
 namespace Json {
 
 #if __cplusplus >= 201103L || (defined(_CPPLIB_VER) && _CPPLIB_VER >= 520)
 typedef std::unique_ptr<CharReader> CharReaderPtr;
 #else
 typedef std::auto_ptr<CharReader>   CharReaderPtr;
 #endif
@@ -127,23 +132,22 @@ bool Reader::parse(const char* beginDoc,
   }
 
   begin_ = beginDoc;
   end_ = endDoc;
   collectComments_ = collectComments;
   current_ = begin_;
   lastValueEnd_ = 0;
   lastValue_ = 0;
-  commentsBefore_ = "";
+  commentsBefore_.clear();
   errors_.clear();
   while (!nodes_.empty())
     nodes_.pop();
   nodes_.push(&root);
 
-  stackDepth_g = 0;  // Yes, this is bad coding, but options are limited.
   bool successful = readValue();
   Token token;
   skipCommentTokens(token);
   if (collectComments_ && !commentsBefore_.empty())
     root.setComment(commentsBefore_, commentAfter);
   if (features_.strictRoot_) {
     if (!root.isArray() && !root.isObject()) {
       // Set error location to start of doc, ideally should be first token found
@@ -156,30 +160,28 @@ bool Reader::parse(const char* beginDoc,
           token);
       return false;
     }
   }
   return successful;
 }
 
 bool Reader::readValue() {
-  // This is a non-reentrant way to support a stackLimit. Terrible!
-  // But this deprecated class has a security problem: Bad input can
-  // cause a seg-fault. This seems like a fair, binary-compatible way
-  // to prevent the problem.
-  if (stackDepth_g >= stackLimit_g) throwRuntimeError("Exceeded stackLimit in readValue().");
-  ++stackDepth_g;
+  // readValue() may call itself only if it calls readObject() or ReadArray().
+  // These methods execute nodes_.push() just before and nodes_.pop)() just after calling readValue(). 
+  // parse() executes one nodes_.push(), so > instead of >=.
+  if (nodes_.size() > stackLimit_g) throwRuntimeError("Exceeded stackLimit in readValue().");
 
   Token token;
   skipCommentTokens(token);
   bool successful = true;
 
   if (collectComments_ && !commentsBefore_.empty()) {
     currentValue().setComment(commentsBefore_, commentBefore);
-    commentsBefore_ = "";
+    commentsBefore_.clear();
   }
 
   switch (token.type_) {
   case tokenObjectBegin:
     successful = readObject(token);
     currentValue().setOffsetLimit(current_ - begin_);
     break;
   case tokenArrayBegin:
@@ -235,17 +237,16 @@ bool Reader::readValue() {
     return addError("Syntax error: value, object or array expected.", token);
   }
 
   if (collectComments_) {
     lastValueEnd_ = current_;
     lastValue_ = &currentValue();
   }
 
-  --stackDepth_g;
   return successful;
 }
 
 void Reader::skipCommentTokens(Token& token) {
   if (features_.allowComments_) {
     do {
       readToken(token);
     } while (token.type_ == tokenComment);
@@ -468,17 +469,17 @@ bool Reader::readObject(Token& tokenStar
   while (readToken(tokenName)) {
     bool initialTokenOk = true;
     while (tokenName.type_ == tokenComment && initialTokenOk)
       initialTokenOk = readToken(tokenName);
     if (!initialTokenOk)
       break;
     if (tokenName.type_ == tokenObjectEnd && name.empty()) // empty object
       return true;
-    name = "";
+    name.clear();
     if (tokenName.type_ == tokenString) {
       if (!decodeString(tokenName, name))
         return recoverFromError(tokenObjectEnd);
     } else if (tokenName.type_ == tokenNumber && features_.allowNumericKeys_) {
       Value numberName;
       if (!decodeNumber(tokenName, numberName))
         return recoverFromError(tokenObjectEnd);
       name = JSONCPP_STRING(numberName.asCString());
@@ -1023,28 +1024,26 @@ private:
   Errors errors_;
   JSONCPP_STRING document_;
   Location begin_;
   Location end_;
   Location current_;
   Location lastValueEnd_;
   Value* lastValue_;
   JSONCPP_STRING commentsBefore_;
-  int stackDepth_;
 
   OurFeatures const features_;
   bool collectComments_;
 };  // OurReader
 
 // complete copy of Read impl, for OurReader
 
 OurReader::OurReader(OurFeatures const& features)
     : errors_(), document_(), begin_(), end_(), current_(), lastValueEnd_(),
       lastValue_(), commentsBefore_(),
-      stackDepth_(0),
       features_(features), collectComments_() {
 }
 
 bool OurReader::parse(const char* beginDoc,
                    const char* endDoc,
                    Value& root,
                    bool collectComments) {
   if (!features_.allowComments_) {
@@ -1052,23 +1051,22 @@ bool OurReader::parse(const char* beginD
   }
 
   begin_ = beginDoc;
   end_ = endDoc;
   collectComments_ = collectComments;
   current_ = begin_;
   lastValueEnd_ = 0;
   lastValue_ = 0;
-  commentsBefore_ = "";
+  commentsBefore_.clear();
   errors_.clear();
   while (!nodes_.empty())
     nodes_.pop();
   nodes_.push(&root);
 
-  stackDepth_ = 0;
   bool successful = readValue();
   Token token;
   skipCommentTokens(token);
   if (features_.failIfExtra_) {
     if ((features_.strictRoot_ || token.type_ != tokenError) && token.type_ != tokenEndOfStream) {
       addError("Extra non-whitespace after JSON value.", token);
       return false;
     }
@@ -1087,25 +1085,25 @@ bool OurReader::parse(const char* beginD
           token);
       return false;
     }
   }
   return successful;
 }
 
 bool OurReader::readValue() {
-  if (stackDepth_ >= features_.stackLimit_) throwRuntimeError("Exceeded stackLimit in readValue().");
-  ++stackDepth_;
+  //  To preserve the old behaviour we cast size_t to int.
+  if (static_cast<int>(nodes_.size()) > features_.stackLimit_) throwRuntimeError("Exceeded stackLimit in readValue().");
   Token token;
   skipCommentTokens(token);
   bool successful = true;
 
   if (collectComments_ && !commentsBefore_.empty()) {
     currentValue().setComment(commentsBefore_, commentBefore);
-    commentsBefore_ = "";
+    commentsBefore_.clear();
   }
 
   switch (token.type_) {
   case tokenObjectBegin:
     successful = readObject(token);
     currentValue().setOffsetLimit(current_ - begin_);
     break;
   case tokenArrayBegin:
@@ -1185,17 +1183,16 @@ bool OurReader::readValue() {
     return addError("Syntax error: value, object or array expected.", token);
   }
 
   if (collectComments_) {
     lastValueEnd_ = current_;
     lastValue_ = &currentValue();
   }
 
-  --stackDepth_;
   return successful;
 }
 
 void OurReader::skipCommentTokens(Token& token) {
   if (features_.allowComments_) {
     do {
       readToken(token);
     } while (token.type_ == tokenComment);
@@ -1445,17 +1442,17 @@ bool OurReader::readObject(Token& tokenS
   while (readToken(tokenName)) {
     bool initialTokenOk = true;
     while (tokenName.type_ == tokenComment && initialTokenOk)
       initialTokenOk = readToken(tokenName);
     if (!initialTokenOk)
       break;
     if (tokenName.type_ == tokenObjectEnd && name.empty()) // empty object
       return true;
-    name = "";
+    name.clear();
     if (tokenName.type_ == tokenString) {
       if (!decodeString(tokenName, name))
         return recoverFromError(tokenObjectEnd);
     } else if (tokenName.type_ == tokenNumber && features_.allowNumericKeys_) {
       Value numberName;
       if (!decodeNumber(tokenName, numberName))
         return recoverFromError(tokenObjectEnd);
       name = numberName.asString();
--- a/toolkit/components/jsoncpp/src/lib_json/json_tool.h
+++ b/toolkit/components/jsoncpp/src/lib_json/json_tool.h
@@ -1,29 +1,35 @@
 // Copyright 2007-2010 Baptiste Lepilleur
 // Distributed under MIT license, or public domain if desired and
 // recognized in your jurisdiction.
 // See file LICENSE for detail or copy at http://jsoncpp.sourceforge.net/LICENSE
 
 #ifndef LIB_JSONCPP_JSON_TOOL_H_INCLUDED
 #define LIB_JSONCPP_JSON_TOOL_H_INCLUDED
 
-#ifndef NO_LOCALE_SUPPORT
+
+// Also support old flag NO_LOCALE_SUPPORT
+#ifdef NO_LOCALE_SUPPORT
+#define JSONCPP_NO_LOCALE_SUPPORT
+#endif
+
+#ifndef JSONCPP_NO_LOCALE_SUPPORT
 #include <clocale>
 #endif
 
 /* This header provides common string manipulation support, such as UTF-8,
  * portable conversion from/to string...
  *
  * It is an internal header that must not be exposed.
  */
 
 namespace Json {
 static char getDecimalPoint() {
-#ifdef NO_LOCALE_SUPPORT
+#ifdef JSONCPP_NO_LOCALE_SUPPORT
   return '\0';
 #else
   struct lconv* lc = localeconv();
   return lc ? *(lc->decimal_point) : '\0';
 #endif
 }
 
 /// Converts a unicode code-point to UTF-8.
--- a/toolkit/components/jsoncpp/src/lib_json/json_value.cpp
+++ b/toolkit/components/jsoncpp/src/lib_json/json_value.cpp
@@ -188,19 +188,19 @@ static inline void releaseStringValue(ch
 #include "json_valueiterator.inl"
 #endif // if !defined(JSON_IS_AMALGAMATION)
 
 namespace Json {
 
 Exception::Exception(JSONCPP_STRING const& msg)
   : msg_(msg)
 {}
-Exception::~Exception() throw()
+Exception::~Exception() JSONCPP_NOEXCEPT
 {}
-char const* Exception::what() const throw()
+char const* Exception::what() const JSONCPP_NOEXCEPT
 {
   return msg_.c_str();
 }
 RuntimeError::RuntimeError(JSONCPP_STRING const& msg)
   : Exception(msg)
 {}
 LogicError::LogicError(JSONCPP_STRING const& msg)
   : Exception(msg)
@@ -298,17 +298,17 @@ Value::CZString& Value::CZString::operat
 }
 
 bool Value::CZString::operator<(const CZString& other) const {
   if (!cstr_) return index_ < other.index_;
   //return strcmp(cstr_, other.cstr_) < 0;
   // Assume both are strings.
   unsigned this_len = this->storage_.length_;
   unsigned other_len = other.storage_.length_;
-  unsigned min_len = std::min(this_len, other_len);
+  unsigned min_len = std::min<unsigned>(this_len, other_len);
   JSON_ASSERT(this->cstr_ && other.cstr_);
   int comp = memcmp(this->cstr_, other.cstr_, min_len);
   if (comp < 0) return true;
   if (comp > 0) return false;
   return (this_len < other_len);
 }
 
 bool Value::CZString::operator==(const CZString& other) const {
@@ -338,31 +338,31 @@ bool Value::CZString::isStaticString() c
 // //////////////////////////////////////////////////////////////////
 // //////////////////////////////////////////////////////////////////
 
 /*! \internal Default constructor initialization must be equivalent to:
  * memset( this, 0, sizeof(Value) )
  * This optimization is used in ValueInternalMap fast allocator.
  */
 Value::Value(ValueType vtype) {
-  static char const empty[] = "";
+  static char const emptyString[] = "";
   initBasic(vtype);
   switch (vtype) {
   case nullValue:
     break;
   case intValue:
   case uintValue:
     value_.int_ = 0;
     break;
   case realValue:
     value_.real_ = 0.0;
     break;
   case stringValue:
     // allocated_ == false, so this is safe.
-    value_.string_ = const_cast<char*>(static_cast<char const*>(empty));
+    value_.string_ = const_cast<char*>(static_cast<char const*>(emptyString));
     break;
   case arrayValue:
   case objectValue:
     value_.map_ = new ObjectValues();
     break;
   case booleanValue:
     value_.bool_ = false;
     break;
@@ -393,16 +393,17 @@ Value::Value(UInt64 value) {
 
 Value::Value(double value) {
   initBasic(realValue);
   value_.real_ = value;
 }
 
 Value::Value(const char* value) {
   initBasic(stringValue, true);
+  JSON_ASSERT_MESSAGE(value != NULL, "Null Value Passed to Value Constructor");	
   value_.string_ = duplicateAndPrefixStringValue(value, static_cast<unsigned>(strlen(value)));
 }
 
 Value::Value(const char* beginValue, const char* endValue) {
   initBasic(stringValue, true);
   value_.string_ =
       duplicateAndPrefixStringValue(beginValue, static_cast<unsigned>(endValue - beginValue));
 }
@@ -561,17 +562,17 @@ bool Value::operator<(const Value& other
       else return false;
     }
     unsigned this_len;
     unsigned other_len;
     char const* this_str;
     char const* other_str;
     decodePrefixedString(this->allocated_, this->value_.string_, &this_len, &this_str);
     decodePrefixedString(other.allocated_, other.value_.string_, &other_len, &other_str);
-    unsigned min_len = std::min(this_len, other_len);
+    unsigned min_len = std::min<unsigned>(this_len, other_len);
     JSON_ASSERT(this_str && other_str);
     int comp = memcmp(this_str, other_str, min_len);
     if (comp < 0) return true;
     if (comp > 0) return false;
     return (this_len < other_len);
   }
   case arrayValue:
   case objectValue: {
@@ -874,17 +875,17 @@ bool Value::asBool() const {
   JSON_FAIL_MESSAGE("Value is not convertible to bool.");
 }
 
 bool Value::isConvertibleTo(ValueType other) const {
   switch (other) {
   case nullValue:
     return (isNumeric() && asDouble() == 0.0) ||
            (type_ == booleanValue && value_.bool_ == false) ||
-           (type_ == stringValue && asString() == "") ||
+           (type_ == stringValue && asString().empty()) ||
            (type_ == arrayValue && value_.map_->size() == 0) ||
            (type_ == objectValue && value_.map_->size() == 0) ||
            type_ == nullValue;
   case intValue:
     return isInt() ||
            (type_ == realValue && InRange(value_.real_, minInt, maxInt)) ||
            type_ == booleanValue || type_ == nullValue;
   case uintValue:
@@ -1274,34 +1275,46 @@ static bool IsIntegral(double d) {
 
 bool Value::isNull() const { return type_ == nullValue; }
 
 bool Value::isBool() const { return type_ == booleanValue; }
 
 bool Value::isInt() const {
   switch (type_) {
   case intValue:
+#if defined(JSON_HAS_INT64)
     return value_.int_ >= minInt && value_.int_ <= maxInt;
+#else
+    return true;
+#endif
   case uintValue:
     return value_.uint_ <= UInt(maxInt);
   case realValue:
     return value_.real_ >= minInt && value_.real_ <= maxInt &&
            IsIntegral(value_.real_);
   default:
     break;
   }
   return false;
 }
 
 bool Value::isUInt() const {
   switch (type_) {
   case intValue:
+#if defined(JSON_HAS_INT64)
     return value_.int_ >= 0 && LargestUInt(value_.int_) <= LargestUInt(maxUInt);
+#else
+    return value_.int_ >= 0;
+#endif
   case uintValue:
+#if defined(JSON_HAS_INT64)
     return value_.uint_ <= maxUInt;
+#else
+    return true;
+#endif
   case realValue:
     return value_.real_ >= 0 && value_.real_ <= maxUInt &&
            IsIntegral(value_.real_);
   default:
     break;
   }
   return false;
 }
@@ -1342,26 +1355,38 @@ bool Value::isUInt64() const {
   default:
     break;
   }
 #endif // JSON_HAS_INT64
   return false;
 }
 
 bool Value::isIntegral() const {
+  switch (type_) {
+    case intValue:
+    case uintValue:
+      return true;
+    case realValue:
 #if defined(JSON_HAS_INT64)
-  return isInt64() || isUInt64();
+      // Note that maxUInt64 (= 2^64 - 1) is not exactly representable as a
+      // double, so double(maxUInt64) will be rounded up to 2^64. Therefore we
+      // require the value to be strictly less than the limit.
+      return value_.real_ >= double(minInt64) && value_.real_ < maxUInt64AsDouble && IsIntegral(value_.real_);
 #else
-  return isInt() || isUInt();
-#endif
+      return value_.real_ >= minInt && value_.real_ <= maxUInt && IsIntegral(value_.real_);
+#endif // JSON_HAS_INT64
+    default:
+      break;
+  }
+  return false;
 }
 
-bool Value::isDouble() const { return type_ == realValue || isIntegral(); }
+bool Value::isDouble() const { return type_ == intValue || type_ == uintValue || type_ == realValue; }
 
-bool Value::isNumeric() const { return isIntegral() || isDouble(); }
+bool Value::isNumeric() const { return isDouble(); }
 
 bool Value::isString() const { return type_ == stringValue; }
 
 bool Value::isArray() const { return type_ == arrayValue; }
 
 bool Value::isObject() const { return type_ == objectValue; }
 
 void Value::setComment(const char* comment, size_t len, CommentPlacement placement) {
@@ -1476,16 +1501,17 @@ PathArgument::PathArgument(const JSONCPP
 
 Path::Path(const JSONCPP_STRING& path,
            const PathArgument& a1,
            const PathArgument& a2,
            const PathArgument& a3,
            const PathArgument& a4,
            const PathArgument& a5) {
   InArgs in;
+  in.reserve(5);
   in.push_back(&a1);
   in.push_back(&a2);
   in.push_back(&a3);
   in.push_back(&a4);
   in.push_back(&a5);
   makePath(path, in);
 }
 
--- a/toolkit/components/jsoncpp/src/lib_json/json_writer.cpp
+++ b/toolkit/components/jsoncpp/src/lib_json/json_writer.cpp
@@ -134,27 +134,33 @@ JSONCPP_STRING valueToString(UInt value)
 }
 
 #endif // # if defined(JSON_HAS_INT64)
 
 namespace {
 JSONCPP_STRING valueToString(double value, bool useSpecialFloats, unsigned int precision) {
   // Allocate a buffer that is more than large enough to store the 16 digits of
   // precision requested below.
-  char buffer[32];
+  char buffer[36];
   int len = -1;
 
-  char formatString[6];
-  sprintf(formatString, "%%.%dg", precision);
+  char formatString[15];
+  snprintf(formatString, sizeof(formatString), "%%.%dg", precision);
 
   // Print into the buffer. We need not request the alternative representation
   // that always has a decimal point because JSON doesn't distingish the
   // concepts of reals and integers.
   if (isfinite(value)) {
     len = snprintf(buffer, sizeof(buffer), formatString, value);
+    
+    // try to ensure we preserve the fact that this was given to us as a double on input
+    if (!strstr(buffer, ".") && !strstr(buffer, "e")) {
+      strcat(buffer, ".0");
+    }
+
   } else {
     // IEEE standard states that NaN values will not compare to themselves
     if (value != value) {
       len = snprintf(buffer, sizeof(buffer), useSpecialFloats ? "NaN" : "null");
     } else if (value < 0) {
       len = snprintf(buffer, sizeof(buffer), useSpecialFloats ? "-Infinity" : "-1e+9999");
     } else {
       len = snprintf(buffer, sizeof(buffer), useSpecialFloats ? "Infinity" : "1e+9999");
@@ -324,17 +330,17 @@ FastWriter::FastWriter()
 
 void FastWriter::enableYAMLCompatibility() { yamlCompatiblityEnabled_ = true; }
 
 void FastWriter::dropNullPlaceholders() { dropNullPlaceholders_ = true; }
 
 void FastWriter::omitEndingLineFeed() { omitEndingLineFeed_ = true; }
 
 JSONCPP_STRING FastWriter::write(const Value& root) {
-  document_ = "";
+  document_.clear();
   writeValue(root);
   if (!omitEndingLineFeed_)
     document_ += "\n";
   return document_;
 }
 
 void FastWriter::writeValue(const Value& value) {
   switch (value.type()) {
@@ -392,19 +398,19 @@ void FastWriter::writeValue(const Value&
 
 // Class StyledWriter
 // //////////////////////////////////////////////////////////////////
 
 StyledWriter::StyledWriter()
     : rightMargin_(74), indentSize_(3), addChildValues_() {}
 
 JSONCPP_STRING StyledWriter::write(const Value& root) {
-  document_ = "";
+  document_.clear();
   addChildValues_ = false;
-  indentString_ = "";
+  indentString_.clear();
   writeCommentBeforeValue(root);
   writeValue(root);
   writeCommentAfterValueOnSameLine(root);
   document_ += "\n";
   return document_;
 }
 
 void StyledWriter::writeValue(const Value& value) {
@@ -608,17 +614,17 @@ bool StyledWriter::hasCommentForValue(co
 
 StyledStreamWriter::StyledStreamWriter(JSONCPP_STRING indentation)
     : document_(NULL), rightMargin_(74), indentation_(indentation),
       addChildValues_() {}
 
 void StyledStreamWriter::write(JSONCPP_OSTREAM& out, const Value& root) {
   document_ = &out;
   addChildValues_ = false;
-  indentString_ = "";
+  indentString_.clear();
   indented_ = true;
   writeCommentBeforeValue(root);
   if (!indented_) writeIndent();
   indented_ = true;
   writeValue(root);
   writeCommentAfterValueOnSameLine(root);
   *document_ << "\n";
   document_ = NULL; // Forget the stream, for safety.
@@ -890,17 +896,17 @@ BuiltStyledStreamWriter::BuiltStyledStre
   , precision_(precision)
 {
 }
 int BuiltStyledStreamWriter::write(Value const& root, JSONCPP_OSTREAM* sout)
 {
   sout_ = sout;
   addChildValues_ = false;
   indented_ = true;
-  indentString_ = "";
+  indentString_.clear();
   writeCommentBeforeValue(root);
   if (!indented_) writeIndent();
   indented_ = true;
   writeValue(root);
   writeCommentAfterValueOnSameLine(root);
   *sout_ << endingLineFeedSymbol_;
   sout_ = NULL;
   return 0;
@@ -1144,20 +1150,20 @@ StreamWriter* StreamWriterBuilder::newSt
   JSONCPP_STRING colonSymbol = " : ";
   if (eyc) {
     colonSymbol = ": ";
   } else if (indentation.empty()) {
     colonSymbol = ":";
   }
   JSONCPP_STRING nullSymbol = "null";
   if (dnp) {
-    nullSymbol = "";
+    nullSymbol.clear();
   }
   if (pre > 17) pre = 17;
-  JSONCPP_STRING endingLineFeedSymbol = "";
+  JSONCPP_STRING endingLineFeedSymbol;
   return new BuiltStyledStreamWriter(
       indentation, cs,
       colonSymbol, nullSymbol, endingLineFeedSymbol, usf, pre);
 }
 static void getValidWriterKeys(std::set<JSONCPP_STRING>* valid_keys)
 {
   valid_keys->clear();
   valid_keys->insert("indentation");