Commit Graph

170 Commits

Author SHA1 Message Date
Rene Rivera
bdfe275d17 Add, and update, documentation build targets. 2016-10-10 11:39:52 -05:00
Sebastian Redl
9a2f7cddb1 Merge branch 'develop' 2016-03-01 16:28:35 +01:00
Sebastian Redl
ebd9a60bf1 Fix compilation error due to incorrect macro usage. 2016-02-18 15:44:46 +01:00
Sebastian Redl
ea94099069 Reorganize headers to more closely match the namespace hierarchy. 2016-02-11 14:58:14 +01:00
Sebastian Redl
35a2807ceb Refactor read_json_internal.
This is a preparation to providing a public interface to the advanced
capabilities of the new parser.
2016-02-11 11:24:12 +01:00
Sebastian Redl
146d86e487 Merge branch 'develop' of github.com:boostorg/property_tree into develop 2016-02-11 10:40:56 +01:00
CornedBee
6e0c028b7a Merge pull request #18 from timostrunk/whitespace_encoding
Ticket 11600 - Part 2, Change of Whitespace encoding in Text nodes
2016-02-11 10:40:48 +01:00
Sebastian Redl
57e49f48ce Revert "Fix bug #11600. Remove whitespace in case only whitespace exists in between XML tags. This allows pretty-printed XML tags to roundtrip"
After thinking it over and looking at the test failures, this doesn't make
sense. Pretty-printing is not supposed to round-trip.

This reverts commit 16d96efd63.
2016-02-11 10:32:05 +01:00
Timo Strunk
3256d3af93 Removed encoding of whitespace to round trip normal text correctly without encoding 2016-02-10 16:39:00 +01:00
CornedBee
7a60b85f22 Merge pull request #16 from timostrunk/fix_whitespace_bug_11600
Fix bug #11600. Remove whitespace in empty XML nodes.
2016-02-10 13:54:29 +01:00
Sebastian Redl
054f8a4b6b Fix unused parameter warnings and possible use of invalid iterator.
Joachim Faulhaber pointed out the warnings. Turns out the second one shows
a real bug: if the JSON input ends with a high UTF-16 surrogate, the code
would try to read the low surrogate from the end iterator.
2016-02-10 12:01:10 +01:00
Sebastian Redl
6a033ffca2 Fix conversion warnings.
Pointed out by Joachim Faulhaber.
2016-02-10 11:59:18 +01:00
Sebastian Redl
19cf8c1151 Merge branch 'develop' of github.com:boostorg/property_tree into develop 2016-02-10 11:47:54 +01:00
Sebastian Redl
702ea8cdf4 Merge remote-tracking branch 'remotes/Lastique/fix_asserts_and_warnings' into develop 2016-02-10 11:43:16 +01:00
CornedBee
df2581dfee Merge pull request #13 from Romain-Geissler-1A/fix-warning-narrow_encoding.hpp
[Trac #11502] Fix "always true comparison" warning in narrow_encoding.hpp
2016-02-10 11:36:38 +01:00
Sebastian Redl
036b2c56c7 Fix filename in example.
Pointed out by Peter Steinbach.
2016-02-10 11:27:14 +01:00
Sebastian Redl
f5df03024e Remove custom-build directory.
The build files in this directory are neither maintained nor tested. They
are already outdated (VS 2008 projects) and will only get more so. I have
no intention of maintaining them.
2016-02-10 11:22:32 +01:00
Timo Strunk
16d96efd63 Fix bug #11600. Remove whitespace in case only whitespace exists in between XML tags. This allows pretty-printed XML tags to roundtrip 2015-10-08 16:13:23 +02:00
Andrey Semashev
6404b8fdc0 Replaced tabs with spaces. Removed trailing spaces. 2015-09-22 18:31:16 +03:00
Andrey Semashev
358ad620ef Replaced tabs with spaces. 2015-09-22 18:20:51 +03:00
Andrey Semashev
2bcc71c6d5 Ported to use BOOST_ASSERT instead of assert. 2015-09-22 18:17:05 +03:00
Andrey Semashev
41b26a9d75 Silenced gcc warnings about a missing return in a non-void function. 2015-09-22 18:13:36 +03:00
Romain Geissler
408e91c5b1 [Trac #11502] Fix "always true comparison" warning in narrow_encoding.hpp 2015-09-02 18:58:00 +02:00
CornedBee
0f9f4cd770 Merge pull request #8 from Bjoe/changes
Fix bug ticket 11130
2015-07-07 16:02:00 +02:00
Sebastian Redl
b4c3029c12 Skip BOMs at the start of the input. 2015-07-07 15:52:57 +02:00
Sebastian Redl
568219d215 Merge branch 'develop' 2015-07-07 14:20:48 +02:00
Sebastian Redl
54518ac8b7 Fix the last C++11isms and remove an unused typedef. 2015-07-03 10:58:33 +02:00
Sebastian Redl
8bdb5439be Fix C++11 uses, gcc/clang warnings and errors, and an incompatibility with the new Boost.Test. 2015-07-02 16:07:23 +02:00
Sebastian Redl
7f3947c13b Add the extensive tests for the new JSON parser. Clean up the test Jamfile.
The new file contains lots of small unit tests for the new JSON parser, far more extensive than the old one.
Keep the old file too, though, because it contains writing and round-trip tests.
2015-06-26 11:10:05 +02:00
Sebastian Redl
b2c488be9b Replace the JSON parser with a new one.
TL;DR: The new parser fixes long-standing bugs and has full Unicode support, but removes non-standard extensions
of the old parser, which could break code:
- String concatenation: the old parser concatenated adjacent string literals like C does.
- Comments: the old parser supported C and C++-style comments. JSON doesn't allow comments.

The JSON writer hasn't been changed; it still has all the Unicode-related problems.

The old JSON parser had quite a few problems:
- Slow to compile.
- Based on the obsolete Spirit.Classic.
- Inherited a multithreading bug from Spirit.Classic (see bug #5520).
- Poor to no support for Unicode.
- Weird departures from standard JSON.
- Tightly bound to string-based property trees.

The new parser has the following features:
- Hand-written recursive descent parser - few template instantiations, fast to compile.
- Parses through a pair of iterators with support for input iterators - can parse directly from streambuf_iterators.
  Doesn't need to load the entire file into memory first.
- Push-based stream model.
- Full support for Unicode. Assumes that char is UTF-8. If wchar_t is 16 bits, assumes UTF-16, with support for surrogate pairs.
- Pluggable encoding support. The public interface doesn't expose this yet. Currently, narrow input streams are assumed to use
  UTF-8 both internally and externally, and wide streams are assumed to use UTF-16 or UTF-32, depending on the bit width of wchar_t.
  Malformed encodings are not accepted.
  The pluggable support allows inserting other external encodings, or making narrow streams parse into wide internal trees, etc.
- Replaceable event handlers. Also not exposed by the public interface, the replaceable event handlers allow parsing into non-string
  property trees and preserving type information of the JSON.
2015-06-26 10:32:29 +02:00
Sebastian Redl
52a99b57d4 Fix build against updated serialization.
We use internal details of the container serialization, but these details changed. Re-implement.
Of course, now we use different details, but I don't want to change the format.
2015-06-10 17:02:22 +02:00
Sebastian Redl
0102fb3155 Merge branch 'develop' of github.com:boostorg/property_tree into develop 2015-05-20 16:27:18 +02:00
CornedBee
14af018669 Merge pull request #9 from lanurmi/spelling-fix-occurred
Fix spelling of "occurred".
2015-05-13 13:13:24 -06:00
Lauri Nurmi
69933709f8 Fix spelling of "occurred". 2015-04-03 18:37:43 +03:00
Jörg Böhme
616631208c Add missing std:: namespace 2015-03-20 00:28:25 +01:00
Sebastian Redl
7cf4890be8 Merge branch 'develop' 2015-01-26 10:54:21 +01:00
Sebastian Redl
56cad33c64 Fix docs build. 2015-01-23 16:01:53 +01:00
Sebastian Redl
8123dede57 Merge branch 'feature/doc-revision' into develop 2015-01-23 15:38:52 +01:00
Sebastian Redl
da2b33b292 Minor fixes in docs Jamfile. 2015-01-23 15:36:48 +01:00
Sebastian Redl
40347030c7 Fix storage precision for floating point numbers.
Fixes bug 10188. Patch by Mange OEstlyngen.
2015-01-23 13:24:45 +01:00
Sebastian Redl
3befb8cbe4 Tests are green. Merge develop branch. 2015-01-23 10:08:42 +01:00
Sebastian Redl
bf1e1b12e7 Let stream_translator fail for signed/unsigned char over/underflow on read.
Fixes bug 7615.
2015-01-22 16:45:38 +01:00
Sebastian Redl
3e6acfd11d Fix equality for non-standard key comparers.
Re-enable tests for case-insensitive property trees.
2015-01-22 16:31:18 +01:00
Sebastian Redl
caa8274643 Enable core wide char tests.
These apparently were disabled since my rewrite before this was ever merged
to release. Very embarrassing.
2015-01-22 13:10:06 +01:00
Sebastian Redl
0af93b93db Reduce incredible repetition in test_property_tree.cpp. 2015-01-22 12:51:11 +01:00
Sebastian Redl
dc2586b4e1 Hopefully fix XML parser tests for GCC 5.0 2015-01-22 12:32:26 +01:00
Sebastian Redl
b87d743944 Fix compilation of ini parser. Fix test to check the right thing. 2015-01-22 11:59:56 +01:00
Sebastian Redl
2463e8732e INI parser: write top-level keys before sections.
Sections don't end in INIs, once the first one is entered, it's impossible
to get back to top level.

Also refactors write_ini a bit.

Fixes bug 4973.
2015-01-21 15:01:03 +01:00
Sebastian Redl
c452635a08 Fix JSON non-ASCII escaping test to work with MSVC. 2015-01-21 12:16:24 +01:00
Sebastian Redl
85f27e2703 Merge remote-tracking branch 'berkus/master' into develop 2015-01-21 12:02:36 +01:00