Sebastian Redl
ea94099069
Reorganize headers to more closely match the namespace hierarchy.
2016-02-11 14:58: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
Sebastian Redl
b4c3029c12
Skip BOMs at the start of the input.
2015-07-07 15:52:57 +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
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
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
Berkus Decker
5c26e8d8b2
Add escaping tests.
2014-11-12 20:31:40 +02:00
Alexander Bogdashevsky
8af8b6bf3b
support for non-std::string keys
2014-04-15 06:19:02 -04:00
Sebastian Redl
85f8d8866c
Merge branch 'develop'.
...
Merges fixes for bugs 7519, 7180, 6582.
2014-02-24 13:51:50 +01:00
Sebastian Redl
291055c65a
Log more data in exact roundtrip tests.
...
This ought to help me track down the test failure on the msvc12 builder.
2014-02-13 16:18:19 +01:00
Sebastian Redl
530e6fe5eb
Fix JSON array compact printing.
...
Fixes bug 7180.
As drive-by fixes, actually test the pretty printer and don't ever
start a new line after a property name.
2014-02-11 16:54:07 +01:00
Sebastian Redl
23d8e7bbbe
Delete files that shouldn't have been there. These are either SVN conversion zombies, or maybe I never merged this from devel. Either way they're gone now.
2013-12-20 13:52:24 +01:00
Sebastian Redl
c3e643059e
Merge r78550 to release. Fixes an outdated test to work again. Fixes bug #6785 . Fixes bug #6808 .
...
[SVN r78679]
2012-05-27 13:16:21 +00:00
Sebastian Redl
5dee8275ab
Remove a stray semicolon. Fix a type conversion that has become invalid in C++11. Update the XML parser test to cope with the new detail/utf8_codecvt layout. See bugs 6808 and 6785 for the first two issues.
...
[SVN r78550]
2012-05-23 12:09:27 +00:00
Sebastian Redl
9b707a030d
Merge [72000],[72001],[72003], [74691], [75587], [75589], [75590], and [75593]
...
from trunk.
Fixes bug 4840.
Fixes bug 5259.
Fixes bug 5281, I think.
Fixes bug 5944.
Fixes bug 5757.
Fixes bug 5710.
Fixes bug 5307, I think.
[SVN r76447]
2012-01-13 12:20:39 +00:00
Sebastian Redl
0181c0f723
Suppress the MSVC insecure warning when compiling tests. Make argument-less sort() work. See bug #5710 .
...
[SVN r75590]
2011-11-21 12:52:12 +00:00
Sebastian Redl
8a22543505
Make PTree XML writer escape attribute values.
...
[SVN r72000]
2011-05-16 20:58:01 +00:00
Sebastian Redl
56cfb6b2f9
Merge r70664-70666 to release. Improves INI parser and brings improvement to docs. Docs should now at least no longer contain completely incorrect examples.
...
[SVN r71994]
2011-05-16 18:50:06 +00:00
Sebastian Redl
afb7767602
Merge UTF-8 XML support improvements (r69622) to release. Fixes bug 5203.
...
[SVN r71993]
2011-05-16 18:39:10 +00:00
Sebastian Redl
b183df107e
Merge r68990-68993, several fixes to PTree. Fixes bug 1678. Fixes bug 4387. Forgot to commit these together with the header part.
...
[SVN r71992]
2011-05-16 18:34:41 +00:00
Sebastian Redl
7c3d04561a
Allow the use of # as a comment character in the PTree INI parser.
...
[SVN r70666]
2011-03-28 13:44:16 +00:00
Sebastian Redl
1c3804c01e
Better support for UTF-8. See bug 5203. Thanks to Qiaozhiqiang for tracking down the actual problem.
...
[SVN r69622]
2011-03-07 09:45:58 +00:00
Sebastian Redl
4d3c2c6998
Allow top-level array in PTree JSON parser, as requested in bug 4387.
...
[SVN r68992]
2011-02-18 16:29:10 +00:00
Sebastian Redl
16a8d52cbc
Apply patch from bug 1678 with slight modification: allow BOM in XML parsing for wide streams. Add test case.
...
[SVN r68991]
2011-02-18 16:16:25 +00:00
Sebastian Redl
d0d71452fc
Merge long-overdue PTree changes to release (libs)
...
[SVN r65976]
2010-10-15 12:41:49 +00:00
Sebastian Redl
5474f9662e
Explicitly convert some iterators. Fixes bug 4140.
...
[SVN r61611]
2010-04-27 10:05:03 +00:00
Sebastian Redl
935a6567e2
Turns out JSON doesn't allow \0 as an escape sequence. Also, don't rely on is_print for figuring out which characters to escape, but instead follow the spec. Fixes bug 3827.
...
[SVN r59738]
2010-02-17 18:43:56 +00:00
Sebastian Redl
80e44c6cf4
Fix a weakness in the XML whitespace tests. This allows me to have correct tests after fixing PR2855, which is also in this commit.
...
[SVN r59161]
2010-01-20 18:47:50 +00:00
Troy D. Straszheim
149c245bda
rm cmake from trunk. I'm not entirely sure this is necessary to satisfy the inspect script, but I'm not taking any chances, and it is easy to put back
...
[SVN r56942]
2009-10-17 02:07:38 +00:00
Troy D. Straszheim
235fedba4e
rm cmake from the release branch before it goes out broken. Policy dictates that you never commit to release, you commit to trunk and merge to release.
...
[SVN r56941]
2009-10-17 01:10:45 +00:00
Sebastian Redl
f9ea6a190e
Copy property_tree to release branch.
...
[SVN r56546]
2009-10-03 10:10:00 +00:00
Sebastian Redl
d58e0ceb6a
Fix compilation under strict conformance, thanks to Daniel.
...
[SVN r56211]
2009-09-15 12:03:37 +00:00
Sebastian Redl
1b06414faf
Remove tabs.
...
[SVN r56093]
2009-09-07 20:42:06 +00:00
Sebastian Redl
844ad72e73
Fix inspection problems.
...
[SVN r56092]
2009-09-07 16:40:42 +00:00
Sebastian Redl
21b6e34fb4
Fix a missing include problem. Hopefully also fix some other sun-cc problems, though not all.
...
[SVN r56065]
2009-09-06 14:14:01 +00:00
Sebastian Redl
4d223fbba6
Hopefully fix a Sandia-gcc-4.4.0_gnu++0x failure.
...
[SVN r56064]
2009-09-06 14:07:20 +00:00
Sebastian Redl
e92dbfc227
Don't mangle whitespace too much.
...
[SVN r56000]
2009-09-03 17:37:36 +00:00
Sebastian Redl
71de844e95
Merge proptree rewrite branch to trunk.
...
[SVN r55966]
2009-09-01 21:27:45 +00:00
Jeremiah Willcock
8173d7d5af
Fixed more tab and min/max issues
...
[SVN r53152]
2009-05-21 14:38:00 +00:00
Daniel James
50e0510f2d
Add missing tests to Jamfile.
...
[SVN r49896]
2008-11-23 16:56:16 +00:00
Daniel James
26af6b21e9
Convert jamfile to v2.
...
[SVN r49895]
2008-11-23 16:56:05 +00:00