For array types whose items are nullable ({"type": ["T", "null"]}), the generated builder previously called valueComplete() in cbNull() without appending anything to the owning vector. Null entries were silently dropped, so vector indices no longer matched JSON array indices.
Generate isArrayKind() / appendNull() helpers and have cbNull() append a default-constructed element when the current frame is an array. For std::optional<T> items this appends an empty optional; for std::unique_ptr<T> items it appends a null pointer. Add nullable string/integer array fields to the example schema and test coverage to verify indices are preserved.
Closes #5
For array types whose items are nullable (`{"type": ["T", "null"]}`), the generated builder previously called `valueComplete()` in `cbNull()` without appending anything to the owning vector. Null entries were silently dropped, so vector indices no longer matched JSON array indices.
Generate `isArrayKind()` / `appendNull()` helpers and have `cbNull()` append a default-constructed element when the current frame is an array. For `std::optional<T>` items this appends an empty optional; for `std::unique_ptr<T>` items it appends a null pointer. Add nullable string/integer array fields to the example schema and test coverage to verify indices are preserved.
For array types whose items are nullable ({"type": ["T", "null"]}),
the generated builder previously called valueComplete() on cbNull() without
appending anything to the owning vector. Null entries were silently dropped,
so vector indices no longer matched JSON array indices.
Generate isArrayKind() / appendNull() helpers and have cbNull() append a
default-constructed element when the current frame is an array. For
std::optional<T> items this appends an empty optional; for std::unique_ptr<T>
items it appends a null pointer. Add nullable string/integer array fields to
the example schema and test coverage to verify indices are preserved.
Fixes#5
andrew
merged commit 3d9772357d into main2026-06-18 20:07:49 +00:00
andrew
deleted branch weaselbot/issue-52026-06-18 20:07:50 +00:00
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Closes #5
For array types whose items are nullable (
{"type": ["T", "null"]}), the generated builder previously calledvalueComplete()incbNull()without appending anything to the owning vector. Null entries were silently dropped, so vector indices no longer matched JSON array indices.Generate
isArrayKind()/appendNull()helpers and havecbNull()append a default-constructed element when the current frame is an array. Forstd::optional<T>items this appends an empty optional; forstd::unique_ptr<T>items it appends a null pointer. Add nullable string/integer array fields to the example schema and test coverage to verify indices are preserved.For array types whose items are nullable ({"type": ["T", "null"]}), the generated builder previously called valueComplete() on cbNull() without appending anything to the owning vector. Null entries were silently dropped, so vector indices no longer matched JSON array indices. Generate isArrayKind() / appendNull() helpers and have cbNull() append a default-constructed element when the current frame is an array. For std::optional<T> items this appends an empty optional; for std::unique_ptr<T> items it appends a null pointer. Add nullable string/integer array fields to the example schema and test coverage to verify indices are preserved. Fixes #5