aboutsummaryrefslogtreecommitdiff
path: root/lib/std/json/stringify_test.zig
AgeCommit message (Collapse)Author
2025-07-19std.json: update to new I/O APIAndrew Kelley
also do a little bit of namespace cleanup
2025-07-07std.io.Writer.printValue: rework logicAndrew Kelley
Alignment and fill options only apply to numbers. Rework the implementation to mainly branch on the format string rather than the type information. This is more straightforward to maintain and more straightforward for comptime evaluation. Enums support being printed as decimal, hexadecimal, octal, and binary. `formatInteger` is another possible format method that is unconditionally called when the value type is struct and one of the integer-printing format specifiers are used.
2025-07-07std.io: deprecated Reader/Writer; introduce new APIAndrew Kelley
2024-09-07Support stringifying non-exhaustive enum to json (#21228)pfg
2024-08-22std.json.WriteStream supports streaming long values directly to the ↵Josh Wolfe
underlying stream (#21155)
2024-04-06json.WriteStream.objectFieldRaw() (#19553)Josh Wolfe
2024-03-09std.json: update tests to match new floating point formattingMarc Tiehuis
2023-10-26x86_64: fix behavior of `getValue`Jacob Young
Old behavior renamed to `getValueIfFree`.
2023-10-25x86_64: pass more testsJacob Young
* 128-bit integer multiplication with overflow * more instruction encodings used by std inline asm * implement the `try_ptr` air instruction * follow correct stack frame abi * enable full panic handler * enable stack traces
2023-10-23x86_64: implement enough to pass unicode testsJacob Young
* implement vector comparison * implement reduce for bool vectors * fix `@memcpy` bug * enable passing std tests
2023-10-22Revert "Revert "Merge pull request #17637 from jacobly0/x86_64-test-std""Jacob Young
This reverts commit 6f0198cadbe29294f2bf3153a27beebd64377566.
2023-10-22Revert "Merge pull request #17637 from jacobly0/x86_64-test-std"Andrew Kelley
This reverts commit 0c99ba1eab63865592bb084feb271cd4e4b0357e, reversing changes made to 5f92b070bf284f1493b1b5d433dd3adde2f46727. This caused a CI failure when it landed in master branch due to a 128-bit `@byteSwap` in std.mem.
2023-10-21x86_64: fix bugs and disable erroring testsJacob Young
2023-08-08std.json: stringify enum literals (#16742)Philipp Lühmann
2023-08-06std.json: josh review fixesJonathan Marler
* renamed enum_big_numbers_quoted option to enum_nonportable_numbers_as_strings * updated stringify doc to mention the option I also reversed the logic to determine whether an integer is nonportable, it seemed easier to reason about. I also took a stab at applying the new option to floats, but, I got stuck at trying to print large floats, not sure if Zig supports that yet.
2023-08-05std.json: fix roundtrip stringify for large integersJonathan Marler
std.json follows interoperability recommendations from RFC8259 to limit JSON number values to those that fit inside an f64. However, since Zig supports arbitrarily large JSON numbers, this breaks roundtrip data congruence. To appease both use cases, I've added an option `emit_big_numbers_quoted` to StringifyOptions. It's disabled by default which preserves roundtrip but can be enabled to favor interoperability.
2023-07-27std.json: WriteStream.print instead of writePreformattedJosh Wolfe
2023-07-21std.json: Unify stringify and writeStream (#16405)Josh Wolfe
2023-07-12Remove len parameter from splat in standard libantlilja
2023-07-10explicitly specify error set of `std.json.stringify`Techatrix
2023-07-03json: give enums a default stringify implementationEvin Yulo
2023-05-13std: Rewrite low-level json api to support streaming (#15602)Josh Wolfe