Niels Lohmann
dee4be88d6
Regenerate the amalgamated headers
...
Signed-off-by: Niels Lohmann <mail@nlohmann.me >
2026-10-10 01:24:42 +02:00
Niels Lohmann
4e2e4f3184
Regenerate the amalgamated headers
...
Signed-off-by: Niels Lohmann <mail@nlohmann.me >
2026-10-09 23:51:18 +02:00
Niels Lohmann
f4e0b06685
Assign the first member when set() meets duplicate keys again
...
Lookups find the first member of a repeated key again, so set(object, key,
value) assigns that member (keeping the key where it is) and drops the
others, as documented before, and a view taken from object[key] shows the
new value. This undoes the code and documentation changes of 5cbb8e6d6 .
Lookups in edited objects (navigation of editable documents) stop at the
first match, like those of parsed objects.
The tests that commit added expect the first member from lookups now. In the
seeded differential test, the documents with repeated keys repeat them after
the real members; the reference holds the first members, which the edits
address and the lookups are compared with, while materialize() is compared
with what parse() makes of the document's dump.
Signed-off-by: Niels Lohmann <mail@nlohmann.me >
2026-10-09 23:44:10 +02:00
Niels Lohmann
ddd0423b14
Merge branch 'json-view/16-view-simd' into json-view/19-edit-set
...
Signed-off-by: Niels Lohmann <mail@nlohmann.me >
2026-10-09 23:33:56 +02:00
Niels Lohmann
61e3d97bfd
Keep the first of duplicate keys in the object hash index again
...
Lookups in objects with 128 members or more return the first member of a
repeated key again, like the linear search of smaller objects. This undoes
the code change of a69542046; its test now expects the first member from
lookups (with and without a table) and the last value from materialize()
and basic_json::parse().
Signed-off-by: Niels Lohmann <mail@nlohmann.me >
2026-10-09 23:33:31 +02:00
Niels Lohmann
42b5e4ac34
Merge branch 'json-view/13-view-dump' into json-view/16-view-simd
...
Signed-off-by: Niels Lohmann <mail@nlohmann.me >
2026-10-09 23:27:13 +02:00
Niels Lohmann
02f90bd307
Merge branch 'json-view/11-view-access' into json-view/13-view-dump
...
Signed-off-by: Niels Lohmann <mail@nlohmann.me >
2026-10-09 23:22:52 +02:00
Niels Lohmann
32853d2c90
Do not shrink the output of dump()
...
finish() copied the whole output when the buffer was more than twice as
large as the result (citm dump +11%). The tighter source_extent()
estimate already keeps the buffer of a small value small.
Signed-off-by: Niels Lohmann <mail@nlohmann.me >
2026-10-09 23:22:34 +02:00
Niels Lohmann
3faacc1c2f
Regenerate the amalgamated headers
...
Signed-off-by: Niels Lohmann <mail@nlohmann.me >
2026-10-09 23:20:52 +02:00
Niels Lohmann
8acbb65839
Regenerate the amalgamated headers
...
Signed-off-by: Niels Lohmann <mail@nlohmann.me >
2026-10-09 17:34:12 +02:00
Niels Lohmann
915ac4bc8b
Merge branch 'json-view/16-view-simd' into json-view/19-edit-set
...
Signed-off-by: Niels Lohmann <mail@nlohmann.me >
2026-10-09 17:22:43 +02:00
Niels Lohmann
a69542046c
Keep the last of duplicate keys in the object hash index
...
Lookups in objects with 128 members or more now return the last member of
a repeated key, like the linear search of smaller objects and like
materialize() and basic_json::parse(). build_object_index let the first
occurrence win, so the same text gave different results depending on the
size of the object.
Signed-off-by: Niels Lohmann <mail@nlohmann.me >
2026-10-09 17:13:26 +02:00
Niels Lohmann
66e875895f
Merge branch 'json-view/13-view-dump' into json-view/16-view-simd
...
Signed-off-by: Niels Lohmann <mail@nlohmann.me >
2026-10-09 17:06:43 +02:00
Niels Lohmann
bd0fc072fc
Merge branch 'json-view/11-view-access' into json-view/13-view-dump
...
Signed-off-by: Niels Lohmann <mail@nlohmann.me >
2026-10-09 16:58:15 +02:00
Niels Lohmann
45045ebb6d
Replace the removed operator bool of basic_json_view in the header and its tests
...
A view is tested with is_discarded(); the lookups in at(), value() and
contains(json_pointer) and the unit tests no longer rely on the explicit
conversion to bool.
Signed-off-by: Niels Lohmann <mail@nlohmann.me >
2026-10-09 16:53:54 +02:00
Niels Lohmann
1d76bc9750
Merge branch 'json-view/08-view-builder' into json-view/11-view-access
...
Signed-off-by: Niels Lohmann <mail@nlohmann.me >
2026-10-09 16:47:20 +02:00
Niels Lohmann
63dc0dce12
Merge branch 'json-view/23-zmij' into json-view/08-view-builder
...
Signed-off-by: Niels Lohmann <mail@nlohmann.me >
2026-10-09 16:40:42 +02:00
Niels Lohmann
581efc817d
Merge branch 'json-view/02b-float-parser' into json-view/23-zmij
...
Signed-off-by: Niels Lohmann <mail@nlohmann.me >
2026-10-09 16:37:56 +02:00
Niels Lohmann
417c187d1a
Regenerate the amalgamated headers
...
Signed-off-by: Niels Lohmann <mail@nlohmann.me >
2026-10-09 16:35:53 +02:00
Niels Lohmann
658aac97eb
Regenerate the amalgamated headers
...
Signed-off-by: Niels Lohmann <mail@nlohmann.me >
2026-10-09 16:31:13 +02:00
Niels Lohmann
4faa3fcca9
Regenerate the amalgamated headers
...
Signed-off-by: Niels Lohmann <mail@nlohmann.me >
2026-10-09 16:11:34 +02:00
Niels Lohmann
ce46d5d694
Regenerate the amalgamated headers
...
Signed-off-by: Niels Lohmann <mail@nlohmann.me >
2026-10-09 16:11:30 +02:00
Niels Lohmann
1d5f9a596b
Regenerate the amalgamated headers
...
Signed-off-by: Niels Lohmann <mail@nlohmann.me >
2026-10-09 16:11:24 +02:00
Niels Lohmann
3168d591e8
Regenerate the amalgamated headers
...
Signed-off-by: Niels Lohmann <mail@nlohmann.me >
2026-10-09 16:07:45 +02:00
Niels Lohmann
e1a85099ef
Regenerate the amalgamated headers
...
Signed-off-by: Niels Lohmann <mail@nlohmann.me >
2026-10-09 16:01:50 +02:00
Niels Lohmann
75ef044426
Merge branch 'json-view/16-view-simd' into json-view/19-edit-set
...
Signed-off-by: Niels Lohmann <mail@nlohmann.me >
2026-10-08 16:39:45 +02:00
Niels Lohmann
1ec2d710f7
Merge branch 'json-view/13-view-dump' into json-view/16-view-simd
...
Signed-off-by: Niels Lohmann <mail@nlohmann.me >
2026-10-08 16:39:42 +02:00
Niels Lohmann
8860bf6f3a
Merge branch 'json-view/11-view-access' into json-view/13-view-dump
...
Signed-off-by: Niels Lohmann <mail@nlohmann.me >
2026-10-08 16:39:40 +02:00
Niels Lohmann
7852da2bc2
Merge branch 'json-view/08-view-builder' into json-view/11-view-access
...
Signed-off-by: Niels Lohmann <mail@nlohmann.me >
2026-10-08 16:39:37 +02:00
Niels Lohmann
0012f65f60
Merge branch 'json-view/23-zmij' into json-view/08-view-builder
...
Signed-off-by: Niels Lohmann <mail@nlohmann.me >
2026-10-08 16:39:35 +02:00
Niels Lohmann
4c43e03d40
Merge CI fixes into json-view/23-zmij
...
Signed-off-by: Niels Lohmann <mail@nlohmann.me >
2026-10-08 16:39:25 +02:00
Niels Lohmann
9962b3cf43
Merge branch 'json-view/16-view-simd' into json-view/19-edit-set
...
Signed-off-by: Niels Lohmann <mail@nlohmann.me >
# Conflicts:
# include/nlohmann/detail/view/document_data.hpp
# single_include/nlohmann/json_view.hpp
2026-10-08 16:33:54 +02:00
Niels Lohmann
d22193a8b6
Fix CI findings in the Zmij writer and its tests
...
- bit_ops.hpp: include macro_scope.hpp (JSON_HEDLEY_ALWAYS_INLINE); fixes IWYU
- to_chars.hpp: C4100 for the unused parameter in release builds, clang-tidy
sign comparison, cpplint runtime/int, GCC -Wstrict-overflow (unsigned abs)
- unit-to_chars.cpp: parse with the library instead of strtod (MinGW's strtod
rounds some 16/17 digit inputs wrongly); no floating-point std::to_chars
with icpc
Signed-off-by: Niels Lohmann <mail@nlohmann.me >
2026-10-08 16:33:32 +02:00
Niels Lohmann
4f1c34e44d
Merge branch 'json-view/13-view-dump' into json-view/16-view-simd
...
Signed-off-by: Niels Lohmann <mail@nlohmann.me >
# Conflicts:
# include/nlohmann/detail/view/document_data.hpp
# single_include/nlohmann/json_view.hpp
2026-10-08 16:29:14 +02:00
Niels Lohmann
5db2fa633c
Merge branch 'json-view/11-view-access' into json-view/13-view-dump
...
Signed-off-by: Niels Lohmann <mail@nlohmann.me >
2026-10-08 16:27:26 +02:00
Niels Lohmann
acde46421b
Merge branch 'json-view/08-view-builder' into json-view/11-view-access
...
Signed-off-by: Niels Lohmann <mail@nlohmann.me >
2026-10-08 16:27:24 +02:00
Niels Lohmann
63396cbe00
Merge branch 'json-view/23-zmij' into json-view/08-view-builder
...
Signed-off-by: Niels Lohmann <mail@nlohmann.me >
# Conflicts:
# Makefile
# meson.build
2026-10-08 16:26:33 +02:00
Niels Lohmann
d9a0844723
Fix document_data for old Clang (3.4-3.6)
...
Drop the empty braced NSDMIs of the std::string members: old Clang
rejects the defaulted constructor when it is used by a member
initializer before the end of the class definition.
Signed-off-by: Niels Lohmann <mail@nlohmann.me >
2026-10-08 16:25:45 +02:00
Niels Lohmann
22b82b487b
Merge branch 'json-view/02b-float-parser' into json-view/23-zmij
...
Signed-off-by: Niels Lohmann <mail@nlohmann.me >
2026-10-08 16:25:42 +02:00
Niels Lohmann
9c7eb12918
Fix GCC module build and MSVC C4127 in the json_view SIMD code
...
GCC ignores the target attribute in modules, so the SSSE3 dispatch is
disabled for the module interface (the check stays portable, SSE2 is kept).
Make the 8-vs-16 byte unrolling condition in scan_string_run a
preprocessor/template split to avoid a constant condition (C4127).
Signed-off-by: Niels Lohmann <mail@nlohmann.me >
2026-10-08 16:23:21 +02:00
Niels Lohmann
2105149798
Fix old clang and MSVC C4127 in editable json documents
...
Value-initialize the const std::less in find_parent (clang 3.4/3.6 do not
implement DR 253), and test the Editable template argument through a
function to avoid MSVC C4127.
Signed-off-by: Niels Lohmann <mail@nlohmann.me >
2026-10-08 16:22:47 +02:00
Niels Lohmann
43c75bef51
Merge branch 'develop' into json-view/02b-float-parser
...
Signed-off-by: Niels Lohmann <mail@nlohmann.me >
# Conflicts:
# tests/src/unit-class_lexer.cpp
2026-10-08 16:19:06 +02:00
Suyog Verma
a269794db7
Use MSVC intrinsics for full multiplication ( #5782 )
...
* Use MSVC intrinsics for full multiplication
Signed-off-by: Suyog Verma <suyogverma0057@gmail.com >
* Fix formatting in unit-class_lexer
Signed-off-by: Suyog Verma <suyogverma0057@gmail.com >
* Address review feedback
Signed-off-by: Suyog Verma <suyogverma0057@gmail.com >
---------
Signed-off-by: Suyog Verma <suyogverma0057@gmail.com >
2026-10-08 08:49:32 +02:00
Niels Lohmann
0a4c6d1a8f
Merge branch 'json-view/16-view-simd' into json-view/19-edit-set
...
Signed-off-by: Niels Lohmann <mail@nlohmann.me >
2026-10-07 20:26:52 +02:00
Niels Lohmann
ad715372bf
Merge branch 'json-view/13-view-dump' into json-view/16-view-simd
...
Signed-off-by: Niels Lohmann <mail@nlohmann.me >
2026-10-07 20:26:50 +02:00
Niels Lohmann
c39680779c
Merge branch 'json-view/11-view-access' into json-view/13-view-dump
...
Signed-off-by: Niels Lohmann <mail@nlohmann.me >
2026-10-07 20:26:47 +02:00
Niels Lohmann
dfdd69d234
Merge branch 'json-view/08-view-builder' into json-view/11-view-access
...
Signed-off-by: Niels Lohmann <mail@nlohmann.me >
2026-10-07 20:26:44 +02:00
Niels Lohmann
33b7b30d06
Merge branch 'json-view/23-zmij' into json-view/08-view-builder
...
Signed-off-by: Niels Lohmann <mail@nlohmann.me >
2026-10-07 20:26:42 +02:00
Niels Lohmann
cb3c0177ed
Merge branch 'json-view/02b-float-parser' into json-view/23-zmij
...
Signed-off-by: Niels Lohmann <mail@nlohmann.me >
2026-10-07 20:26:39 +02:00
Niels Lohmann
39d34f30ba
Merge branch 'develop' into json-view/02b-float-parser
...
Signed-off-by: Niels Lohmann <mail@nlohmann.me >
2026-10-07 20:26:13 +02:00