mirror of
https://codeberg.org/ziglang/zig
synced 2026-11-18 07:05:05 +00:00
Expose 2 functions from std.json. These functions take a slice of bytes and forward them to a given writer as a JSON encoded string. The use case I have for this is in a custom JsonStringWriter. This writer takes data and automatically encodes it as JSON string characters and forwards it to an underlying writer. I use this JsonStringWriter in combination with std.fmt.format to go directly from a format string/arg pair to JSON. This way I don't have to format my string into a separate buffer first and encode it afterwards, which avoids the need to create a temporary buffer to hold the unencoded but formatted string. |
History
|
|
|---|---|---|
| .. | ||
| compiler_rt | ||
| docs | ||
| include | ||
| init-exe | ||
| init-lib | ||
| libc | ||
| libcxx | ||
| libcxxabi | ||
| libunwind | ||
| std | ||
| tsan | ||
| build_runner.zig | ||
| c.zig | ||
| compiler_rt.zig | ||
| ssp.zig | ||
| test_runner.zig | ||