2
0
mirror of https://github.com/boostorg/json.git synced 2026-02-02 21:02:18 +00:00
Commit Graph

497 Commits

Author SHA1 Message Date
Dmitry Arkhipov
7e2f458b41 silence GCC false positive warning in tests 2024-07-03 08:23:44 +03:00
Dmitry Arkhipov
9b823e095b try_at functions 2024-06-17 16:41:15 +03:00
Dmitry Arkhipov
6bb79c4a25 try_as_ functions 2024-06-17 14:07:14 +03:00
Dmitry Arkhipov
4ebd252a13 try_at_pointer and try_set_at_pointer 2024-06-17 09:28:14 +03:00
Dmitry Arkhipov
274a0f5537 try_to_number 2024-06-17 09:18:09 +03:00
Dmitry Arkhipov
0b410ea466 don't build tests in CMake by default 2024-05-17 18:36:57 +03:00
Dmitry Arkhipov
1f6f1a2384 handle missing error case in direct parsing 2024-05-13 21:06:56 +03:00
Vaishnav Katiyar
dc9521601c allow_invalid_utf16 2024-04-10 16:45:06 +05:30
Dmitry Arkhipov
9f85ed6d62 fix value_to for variants
After we allowed exceptions to propagate through error_code-based
conversions (when the user invoked value_to, rather than try_value_to),
we inadvertently broke value_to for variants, because they relied on
exceptions being caught by try_value_to. This change disables exception
propagation for exactly one level of nesting.
2024-04-03 15:22:27 +03:00
Dmitry Arkhipov
2883ff1689 conversion of described classes supports private members 2024-03-02 10:59:31 +03:00
Dmitry Arkhipov
5663210adf use Boost.Endian for endianness 2024-02-12 22:52:36 +03:00
Dmitry Arkhipov
bacc644f93 deprecate type aliases 2024-02-09 13:19:49 +03:00
Dmitry Arkhipov
e8d8409928 rvalue ref overload for visit 2024-02-07 23:11:35 +03:00
Dmitry Arkhipov
b07a034870 fix references used in visit
1. Fix references in return type
2. Pass nullptr to the visitor with the same value category as the argument.
    This is done for uniformity.
2024-02-07 21:39:54 +03:00
Dmitry Arkhipov
ed3a618e4c direct parsing supports paths 2024-02-06 20:01:31 +03:00
Dmitry Arkhipov
14dfadb44b add conversion support for paths 2024-02-06 20:01:31 +03:00
Dmitry Arkhipov
194aefb376 do not allow self-referential sequences
If the sequence's value type is the same type as the sequence, our
sequence conversion algorithms can't handle them, because they clearly
have some additional data associated with them. As such, they need
special treatment.
2024-02-05 14:07:15 +03:00
Dmitry Arkhipov
1eb855b470 fix build as CMake subdirectory
Also add tests for different CMake use cases
2024-01-01 23:49:29 +03:00
Dmitry Arkhipov
3d17afc229 increase testing of CMake build files 2023-10-26 09:14:52 +03:00
Dmitry Arkhipov
a0fbf1d906 fix msvc build of tests 2023-10-25 11:29:13 +03:00
Dmitry Arkhipov
e19eddeaee parse_into clears strings before filling them 2023-10-09 16:59:39 +03:00
Dmitry Arkhipov
75981e701e parse_into clears sequences before filling them 2023-10-09 16:59:39 +03:00
Dmitry Arkhipov
f144f382d8 document direct parsing 2023-10-09 16:59:39 +03:00
Dmitry Arkhipov
a3821cea69 increase parse_into coverage 2023-10-09 16:59:39 +03:00
Dmitry Arkhipov
c1b7174780 add array size checking for parse_into 2023-10-09 16:59:39 +03:00
Dmitry Arkhipov
4f4396e1f8 test parse_into error reporting 2023-10-09 16:59:39 +03:00
Dmitry Arkhipov
9859866d08 parse_into supports std::array 2023-10-09 16:59:39 +03:00
Dmitry Arkhipov
10ef306f82 test/parse_into.cpp requires /bigobj on msvc 2023-10-09 16:59:39 +03:00
Dmitry Arkhipov
7b26a344be parse_into supports variants 2023-10-09 16:59:39 +03:00
Dmitry Arkhipov
98b85ad1ab parse_into tuple support works on C++11 2023-10-09 16:59:39 +03:00
Dmitry Arkhipov
71a6521203 extend parse_into API, document it 2023-10-09 16:59:39 +03:00
Dmitry Arkhipov
7133184252 parse_into supports optionals 2023-10-09 16:59:39 +03:00
Dmitry Arkhipov
ef6e310141 parse_into supports described enums 2023-10-09 16:59:39 +03:00
Peter Dimov
4c628ae36a Add null_handler 2023-10-09 16:59:39 +03:00
Peter Dimov
7761788417 Add parse_into 2023-10-09 16:59:39 +03:00
Dmitry Arkhipov
07efc5e83b better document building without exceptions
Also, a test for building without exceptions.
2023-10-06 22:56:17 +03:00
Dmitry Arkhipov
66d9251167 more init-list value construction tests 2023-09-11 16:59:10 +03:00
Dmitry Arkhipov
a07e38be41 is_variant_like 2023-09-09 13:09:07 +03:00
Peter Dimov
557676b68c Add a variant2 test to value_to.cpp, extracted from #925 2023-09-03 23:57:11 +03:00
Dmitry Arkhipov
25e740d7ba fix inconsistent choice of init list constructor
On some compilers value{x} invokes initializer_list constructor, on
others it is equivalent to value(x). This is very problematic, but this
isn't something we can fix. On the other hand, we CAN make init list
construction to be equivalent to value(x), if the size of init list is
one. This commit does exactly that.
2023-08-25 20:27:46 +03:00
Dmitry Arkhipov
2acdb29a32 fix reading beyond input buffer
This fixes a rare case when the parser first suspends inside a comment,
then is given input exactly up to the newline character. Before the fix
it proceeded to read past the end of the buffer or hit an assert.
2023-08-25 19:50:20 +03:00
Dmitry Arkhipov
c3d6757ab9 allow exception propagation from nested conversions
Specifically, when user invokes throwing value_to, when it goes to
non-throwing conversion, then back to throwing conversion, exceptions
will be able to propogate still.
2023-07-03 17:59:14 +03:00
Dmitry Arkhipov
3d751ad9e5 handle bias overflow 2023-06-28 13:22:49 +03:00
Dmitry Arkhipov
dd5494b202 accept numbers with large exponent 2023-06-26 21:38:25 +03:00
Dmitry Arkhipov
285c3aa5a2 mode to not parse numbers 2023-06-23 18:12:08 +03:00
Dmitry Arkhipov
8957955af4 restore object storage on failed range insert 2023-06-14 09:53:18 +03:00
Dmitry Arkhipov
c4329519cd do not reserve preemptively in object 2023-06-14 09:36:09 +03:00
Dmitry Arkhipov
4700500920 use Charconv for precise parsing 2023-06-13 16:50:11 +03:00
Dmitry Arkhipov
3956bdbb78 fix asan failures
Changes to array sizes in tests are due to asan bug.
2023-06-07 14:12:57 +03:00
Dmitry Arkhipov
be759c5051 only throw system_error 2023-06-02 16:23:08 +03:00