aboutsummaryrefslogtreecommitdiff
path: root/lib/std/json/dynamic.zig
AgeCommit message (Collapse)Author
2025-10-30std.debug.lockStderrWriter: also return ttyconfMatthew Lugg
`std.Io.tty.Config.detect` may be an expensive check (e.g. involving syscalls), and doing it every time we need to print isn't really necessary; under normal usage, we can compute the value once and cache it for the whole program's execution. Since anyone outputting to stderr may reasonably want this information (in fact they are very likely to), it makes sense to cache it and return it from `lockStderrWriter`. Call sites who do not need it will experience no significant overhead, and can just ignore the TTY config with a `const w, _` destructure.
2025-08-11std.ArrayList: make unmanaged the defaultAndrew Kelley
2025-07-19std.json: update to new I/O APIAndrew Kelley
also do a little bit of namespace cleanup
2025-07-07std.fmt: breaking API changesAndrew Kelley
added adapter to AnyWriter and GenericWriter to help bridge the gap between old and new API make std.testing.expectFmt work at compile-time std.fmt no longer has a dependency on std.unicode. Formatted printing was never properly unicode-aware. Now it no longer pretends to be. Breakage/deprecations: * std.fs.File.reader -> std.fs.File.deprecatedReader * std.fs.File.writer -> std.fs.File.deprecatedWriter * std.io.GenericReader -> std.io.Reader * std.io.GenericWriter -> std.io.Writer * std.io.AnyReader -> std.io.Reader * std.io.AnyWriter -> std.io.Writer * std.fmt.format -> std.fmt.deprecatedFormat * std.fmt.fmtSliceEscapeLower -> std.ascii.hexEscape * std.fmt.fmtSliceEscapeUpper -> std.ascii.hexEscape * std.fmt.fmtSliceHexLower -> {x} * std.fmt.fmtSliceHexUpper -> {X} * std.fmt.fmtIntSizeDec -> {B} * std.fmt.fmtIntSizeBin -> {Bi} * std.fmt.fmtDuration -> {D} * std.fmt.fmtDurationSigned -> {D} * {} -> {f} when there is a format method * format method signature - anytype -> *std.io.Writer - inferred error set -> error{WriteFailed} - options -> (deleted) * std.fmt.Formatted - now takes context type explicitly - no fmt string
2025-07-07std.io: move getStdIn, getStdOut, getStdErr functions to fs.FileAndrew Kelley
preparing to rearrange std.io namespace into an interface how to upgrade: std.io.getStdIn() -> std.fs.File.stdin() std.io.getStdOut() -> std.fs.File.stdout() std.io.getStdErr() -> std.fs.File.stderr()
2025-02-10std.ArrayList: popOrNull() -> pop() [v2] (#22720)Meghan Denny
2024-07-25Add `std.json.ParseOptions.parse_numbers` to preserve float precision (#20744)Eugene-Dash
2024-07-03json: respect duplicate_field_behavior in std.json.Value.jsonParseTechatrix
2024-05-27update the codebase for the new std.Progress APIAndrew Kelley
2023-09-11json: respect max_value_len when parsing std.json.Value (#17107)Techatrix
2023-08-17std.json: avoid stale pointers when parsing Value (#16864)Ian Johnson
Closes #16861 Using `alloc_if_needed` when parsing a `Value` allows receiving a token which points to the buffer of the underlying `Reader`. This token will no longer be valid after the `Reader`'s buffer is refilled, which will happen with large values. Using `alloc_always` avoids this issue by ensuring the returned tokens always own their data independently of the underlying buffer.
2023-07-27std.json: WriteStream.print instead of writePreformattedJosh Wolfe
2023-07-21std.json: Unify stringify and writeStream (#16405)Josh Wolfe
2023-07-07add `jsonParseFromValue` to `std.json.Value` (#16324)Techatrix
2023-06-19std: Support user-provided jsonParse method. Unify json.Parser and ↵Josh Wolfe
json.parse* (#15705)
2023-05-13std: Rewrite low-level json api to support streaming (#15602)Josh Wolfe