Mike R
a07fc53287
Add setting precision for json writers and also add decimal places precision type. ( #752 )
...
* Added setting precision for writers.
* Added special case for precise precision and global precision.
* Added good setting of type of precision and also added this type to BuiltStreamWriter and for its settings.
* Added some tests.
2018-03-13 15:35:31 -05:00
Christopher Dunn
af2598cdd3
Merge pull request #751 from open-source-parsers/properly_swappable
...
Remove std::swap<Json::Value> in favor of ADL
2018-03-06 17:14:24 -06:00
Billy Donahue
1d95628ba8
Remove std::swap<Json::Value> in favor of ADL
...
Comply with http://en.cppreference.com/w/cpp/concept/Swappable
Don't open namespace std.
2018-03-06 12:51:58 -05:00
Christopher Dunn
3e2b8ea9cc
Minor changes for static analysis ( #749 )
...
re: #747
2018-03-03 12:51:17 -06:00
Christopher Dunn
1ab310e3ed
Merge pull request #748 from dueringa/feature/clarifyIndentDocumentation
...
Clarify documentation regarding indentation / newline
2018-03-03 09:46:36 -06:00
uvok cheetah
c7728e8658
Clarify documentation regarding indentation / newline
2018-03-03 12:45:54 +01:00
Christopher Dunn
313a0e4c34
Merge pull request #743 from tjanc/tjanc/fix-utf8-codepoint
...
Incorrect byte shift when interpreting 32-bit utf-8 codepoints
2018-02-14 10:33:35 -06:00
Thomas Jandecka
592d942b3b
fix: byte shift when interpreting 32-bit utf-8 codepoints
2018-02-14 14:23:58 +01:00
luzpaz
5b45aa55ca
Misc-typos ( #741 )
...
Found in downstream CMake repo via `codespell -q 3`
2018-02-08 19:05:50 -06:00
Christopher Dunn
07a324fb14
Merge pull request #736 from maxim-ky/master
...
Move the existing value to "removed" argument; removed is optional (could be nullptr)
2018-01-29 21:13:47 -06:00
Maxim Ky
1ec85c76a4
Value::removeMember arg "removed" is optional now (could be nullptr)
2018-01-29 16:59:24 +03:00
Maxim Ky
c27936e0aa
Value::removeMember moves the existing value to "removed" now
2018-01-29 16:58:45 +03:00
drgler
04abe38148
Issue #731 : Provide new JSONCPP_OP_EXPLICIT macro to restore VS 2012 support after recent introduction of explicit conversion function in JSON::Value.
2018-01-20 15:38:39 -06:00
Christof Krüger
edb4bdb7ec
Do not deprecate whole class but only constructors of Json::Reader.
...
This should fix warning C4996 issued by Visual Studio in cases where
Json::Reader is not even used by client code.
2018-01-20 15:32:22 -06:00
Christopher Dunn
0ced843c97
Merge pull request #726 from okodron/fix-704
...
Value::copy() creates a deep copy now
2018-01-20 15:27:46 -06:00
Andrey Okoshkin
9b569c8ce3
Make Value copy constructor simplier
...
Helper private methods Value::dupPayload() and Value::dupMeta() are added.
Value copy constructor doesn't attempt to delete its data first.
* Value::dupPayload() duplicates a payload.
* Value::dupMeta() duplicates comments and an offset position with a limit.
2018-01-12 15:59:20 +03:00
Andrey Okoshkin
392e3a5b49
Add basic test for Value::copy() ( #704 )
2018-01-12 14:36:01 +03:00
Andrey Okoshkin
c69148c946
Fix Value::copyPayload() and Value::copy() ( #704 )
...
Value copy constructor shares the same code with Value::copy() and Value::copyPayload().
New Value::releasePayload() is used to free payload memory.
Fixes : #704
2018-01-12 14:33:47 +03:00
Christopher Dunn
2f227cb122
Merge pull request #718 from dbeurle/master
...
CZString as public when using NVCC, see issue #486
2017-12-22 23:19:07 -06:00
Darcy Beurle
798f6ba055
CZString as public when using NVCC, see issue #486
2017-12-22 22:48:20 +01:00
Christopher Dunn
72f6cc7fd0
Merge pull request #716 from cdunn2001/master
...
Speed up TravisCI build
2017-12-21 02:33:50 -06:00
Christopher Dunn
d3ce75c74e
pyenv global 3.6
...
We need pip3, and TravisCI build error says:
The `pip3` command exists in these Python versions: 3.6, 3.6.3
2017-12-21 02:05:52 -06:00
Christopher Dunn
de5fb8e022
Try to use default python on Trusty, for speed
...
Running `pyenv install` wastes about 3 minutes.
* https://docs.travis-ci.com/user/languages/python
"for Trusty, this means 2.7.6 and 3.4.3"
2017-12-21 01:27:38 -06:00
Christopher Dunn
899894f0f5
-std=c++11 ( #715 )
...
We set this is the Meson build to eliminate warnings, but
c++0x should still work, at least for now.
See #695 for discussion.
2017-12-21 01:22:40 -06:00
Christopher Dunn
ddabf50f72
1.8.4; soversion=20
1.8.4
2017-12-20 15:07:10 -06:00
Christopher Dunn
63ab03ca28
replace code point in range(0xD800, 0xDFFF) to replacement mark ( #714 )
...
closes #712
2017-12-20 14:43:55 -06:00
Christopher Dunn
41ff85f443
pyenv install ( #713 )
...
```
Unfortunately, since our latest image update, Python 3.5 doesn't come pre-installed anymore. Hence, you will have to install it via `pyenv` as a first step e.g.
before_install
- pyenv install 3.5.0 && pyenv global 3.5.0
support@travis-ci.com
```
2017-12-20 14:24:51 -06:00
Wolfram Rösler
9079422ac1
Allow Json::Value to be used in a boolean context ( #695 )
...
Must bump soversion too.
2017-12-05 11:18:55 -06:00
Christopher Dunn
c39aa295e4
Merge pull request #707 from remyjette/valuetostring-sign-mismatch
...
Fix sign mismatch in `valueToString`
2017-12-04 20:02:47 -06:00
Remy Jette
42ca02b833
Fix sign mismatch in valueToString
...
`valueToString` takes an argument `unsigned int precision`, but it is used with `%d` rather than `%u` in the `snprintf` format string. Make the format string look for an unsigned value instead.
2017-12-04 17:49:36 -08:00
Josh Soref
e6a588a246
Spelling ( #703 )
2017-12-03 10:54:29 -06:00
Sascha Zelzer
7c979e8661
Suppress implicit-fallthrough warnings from GCC 7 ( #697 )
...
GCC 7, when compiling with -Wimplicit-fallthrough=1 or higher, issues a warning which can be suppressed using a comment that matches certain regular expressions. The comment change does just that: signal to GCC that the fall through is intentional.
Fixes #676
2017-11-16 13:13:55 -06:00
Christopher Dunn
c469326b47
Merge pull request #699 from MarcelRaad/msvc_warnings
...
MSVC warning fixes in tests
2017-11-16 13:08:39 -06:00
Marcel Raad
240c85a10c
MSVC warning fixes in tests
...
- only use "#pragma GCC" on GCC-compatible compilers
- suppress deprecation warnings also on MSVC
2017-11-10 11:00:40 +01:00
Christopher Dunn
d61cddedac
rm unused func
2017-10-29 23:45:01 -05:00
Brian W. Mulligan
5a2dc7a2ad
Add comment to README giving instructions on how to install to a directory other than /usr/local ( #694 )
2017-10-18 00:20:45 -05:00
Wolfram Rösler
a06b390187
Un-deprecate removeMember overloads, return void ( #693 )
...
* Un-deprecate removeMember overloads, return void
Sometimes we just want to remove something we don't need anymore. Having
to supply a return buffer for the removeMember function to return something
we don't care about is a nuisance. There are removeMember overloads that
don't need a return buffer but they are deprecated. This commit un-deprecates
these overloads and modifies them to return nothing (void) instead of the
object that was removed.
Further discussion: https://github.com/open-source-parsers/jsoncpp/pull/689
WARNING: Changes the return type of the formerly deprecated removeMember
overloads from Value to void. May break existing client code.
* Minor stylistic fixes
Don't explicitly return a void value from a void function. Also, convert
size_t to unsigned in the CZString ctor to avoid a compiler warning.
2017-10-18 00:19:27 -05:00
Paweł Kierski
42a161fc80
Serialize UTF-8 string with Unicode escapes ( #687 )
...
Squashed and merged.
2017-10-03 18:19:20 -07:00
Christopher Dunn
a3a4059367
Use non-deprecated removeMember()
...
closes #683
2017-09-30 00:46:15 -05:00
Christopher Dunn
4d587638af
Merge pull request #679 from hughbe/clang-warnings
...
Fix unknown pragma warnings with clang
2017-09-17 02:56:21 -05:00
Christopher Dunn
75e0c39393
Merge pull request #680 from jasonszang/master
...
Fix meson.build to allow using jsoncpp as a subproject
2017-09-17 02:54:43 -05:00
Jason S Zang
43fd41d1fc
Fix meson.build to allow using jsoncpp as a subproject
2017-09-16 11:19:30 +01:00
Hugh Bellamy
7287065b63
Fix unknown pragma warnings with clang
2017-09-16 10:01:09 +01:00
Christopher Dunn
9249878229
Merge pull request #678 from open-source-parsers/append-move
...
fixes #677
2017-09-15 19:15:50 -05:00
Christopher Dunn
17c14e73a9
Use move ctor in append()
2017-09-15 18:55:50 -05:00
Christopher Dunn
21e133c6fb
Merge pull request #675 from wolframroesler/patch-1
...
closes #671
2017-09-15 01:11:24 -05:00
Wolfram Rösler
ff6b449a07
Add value_type to improve integration with boost
...
Without value_type, Boost.Test version 1.65.0 throws a compiler error when a Json::Value object is compared to another with BOOST_TEST. Example and further discussion are in https://github.com/open-source-parsers/jsoncpp/issues/671 .
2017-09-14 09:31:36 +02:00
Christopher Dunn
f2f19b03fb
Merge pull request #670 from cdunn2001/fix-travis
...
Fix travis
2017-09-13 23:07:21 -05:00
Christopher Dunn
026c39fa1a
Try Travis support suggestion for py3
...
Hi Christopher,
Thank you for reaching out and sorry to hear about the troubles.
Regarding the pip3 error, it was indeed caused by our image updates. We've cleaned-up the way we set-up the Python environment and now strictly enforce Python version use using pyenv. Which means that if you want to use a different Python version than the system one (which is 2.7.6), you have to explicitly specify it. Adding a "before_install: pyenv global 3.5" step to your travis.yml should switch the system version and make pip3 work without installing any additional packages.
2017-09-13 22:36:39 -05:00
Christopher Dunn
614671d09b
Merge pull request #669 from cdunn2001/avoid-redundant-depreciation-warnings
...
Ignoring the unrelated TravisCI build errors. Those are being addressed separately, in #670 .
2017-09-11 14:00:59 -05:00
Christopher Dunn
132840aaa1
More VS warning prevention
...
See comment by jpo38 in SO:
* https://stackoverflow.com/questions/46151531/how-works-deprecated-warnings-and-how-to-remove-them-when-using-jsoncpp/46156833#46156833
2017-09-11 13:44:07 -05:00
Motti Lanzkron
9bb984a594
Update writer.h
...
fix typos
2017-09-11 13:17:21 -05:00
Christopher Dunn
66d4573206
Drop TITLE from Doxygen docs
...
It took up too much room at the top.
Note that we needed to remove it from 2 places, since the main
index.html seems not to use the same top-of-page as the rest uses.
2017-09-10 20:10:18 -05:00
Christopher Dunn
b29fc9834f
Link classes and namespace
2017-09-10 20:04:24 -05:00
Christopher Dunn
1a54511aa1
Drop timestamp from HTML doxygen
2017-09-10 20:00:43 -05:00
Christopher Dunn
a7ad98fb82
rsync less
2017-09-10 19:55:08 -05:00
Christopher Dunn
692164d471
Update header.html
2017-09-10 19:55:08 -05:00
Christopher Dunn
c95a841fef
Generated new header.html
2017-09-10 19:55:08 -05:00
Christopher Dunn
e895eccd18
Generated new footer.html
2017-09-10 19:55:07 -05:00
Christopher Dunn
3b5f8bef41
Merge pull request #667 from cdunn2001/foo
...
Drop stderr
2017-09-09 15:15:10 -05:00
Christopher Dunn
c89f0282d1
Do not write to stderr
...
fixes #665
closes #666
2017-09-09 14:49:55 -05:00
Christopher Dunn
1b68b02ccd
Try adding python-3.5 in TravisCI
2017-09-09 14:48:02 -05:00
Christopher Dunn
adb9ab1424
Merge pull request #660 from SloCompTech/master
...
fixes #659
fixes #661
2017-09-05 02:58:50 -05:00
Martin Dagarin
49da91c786
Fixed compile bug
2017-09-04 21:10:15 +02:00
Martin Dagarin
e8378d1e74
Fixed swiched parameters in install
2017-09-04 21:07:49 +02:00
Christopher Dunn
2de18021fc
Merge pull request #655 from cdunn2001/fix-649
...
Fixes #649
Fixes #654
1.8.3
2017-08-28 09:11:00 -05:00
Christopher Dunn
c98e1d85e3
Bump to soversion=19, 1.8.3
...
Note that cmake is deprecated, but we keep it in-sync manually for now.
2017-08-28 09:04:33 -05:00
Christopher Dunn
d830c0ab94
Fix writeCommentBeforeValue() iter deref
...
fixes #649
2017-08-28 08:43:05 -05:00
Christopher Dunn
90591c70cd
Suppress GCC deprecated-declarations warning for tests
2017-08-28 08:42:43 -05:00
Christopher Dunn
4cfae897c0
Merge pull request #652 from cdunn2001/meson-not-scons
...
Meson not scons; 1.8.2<-1.8.1
1.8.2
2017-08-27 15:30:15 -05:00
Christopher Dunn
f4ec601fd3
Drop NEWS.txt
...
Older news can be found at
* https://github.com/open-source-parsers/jsoncpp/wiki/News
2017-08-27 15:23:55 -05:00
Christopher Dunn
d40f26d472
Move amalgamated source details to wiki
2017-08-27 15:16:43 -05:00
Christopher Dunn
c668af9d41
Update README
...
* Document meson/ninja.
* Deprecate cmake.
* Drop scons.
2017-08-27 15:11:40 -05:00
Christopher Dunn
13b5ed7287
1.8.2 <- 1.8.1
...
Soon, I hope to drop the cmake stuff and let meson handle
the version numbers.
2017-08-27 15:02:01 -05:00
Christopher Dunn
6d31cec7cf
Drop scons support
2017-08-27 15:02:01 -05:00
Christopher Dunn
5331d295aa
Merge branch 'fix-578'
2017-08-27 14:17:31 -05:00
Christopher Dunn
004270db37
Avoid memory error
...
But simply use `.assign()` instead of the extra copy. (See comment from
@BillyDonhue at #580.)
fixes #578
closes #580
2017-08-27 14:16:01 -05:00
Gaurav
9006194139
Fix uninitialized value detected by valgrind
...
Fix issue reported in https://github.com/open-source-parsers/jsoncpp/issues/578
For std::string variable, length() is more readable than size().
2017-08-27 14:16:01 -05:00
Christopher Dunn
6062f9b848
Merge pull request #641 from maksdamir/master
...
Fixing warnings. Added JSONCPP_DEPRECATED definition for clang. Also …
2017-08-05 15:45:01 -05:00
damiram
ef16a35328
Fixing warnings. Added JSONCPP_DEPRECATED definition for clang. Also updating .gitignore to ignore .DS_Store files (Mac OS Finder generated)
2017-08-02 22:44:42 -07:00
Christopher Dunn
7354da8077
Merge pull request #640 from cfyzium/master
...
Fix non-rvalue Json::Value assignment operator (should copy, not move)
2017-08-01 01:22:41 -05:00
Александр Малинин
6a15ca6442
Fix non-rvalue Json::Value assignment operator (should copy, not move)
2017-07-31 15:29:02 +03:00
Christopher Dunn
9a048e5766
Merge pull request #637 from ssbr/fix-owners
...
Restore BL's authorship attribution, and add "The Jsoncpp Authors" where it was missing
2017-07-30 21:43:25 -05:00
Devin Jeanpierre
59e4d35339
Restore BL's authorship attribution, and add "The Jsoncpp Authors" where it was missing.
...
Requested/noticed in https://github.com/open-source-parsers/jsoncpp/pull/610 , and a
followup to https://github.com/open-source-parsers/jsoncpp/pull/607 .
2017-07-21 03:44:36 -07:00
Christopher Dunn
f26edb05e5
Merge pull request #630 from jschueller/appveyor
...
Fix shared/static lib build conflict
resolves #631
2017-07-16 17:18:24 -05:00
Billy Donahue
cadb6dd9a6
Merge pull request #636 from pavel-pimenov/fix-strstr
...
strstr -> strchr
2017-07-13 11:23:04 -04:00
pavel.pimenov
ea9f0cec30
strstr -> strchr
...
https://www.viva64.com/en/w/V817/print/
2017-07-13 14:21:53 +03:00
Julien Schueller
ffdcc9355d
Avoid import/static libs name clash
2017-07-13 09:03:35 +02:00
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