0
Fork 0
mirror of https://codeberg.org/ziglang/zig synced 2026-11-18 07:05:05 +00:00
zig/lib
Jonathan Marler f598234ee8 std.json: expose encodeJsonString and encodeJsonStringChars
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 2022-07-24 11:51:59 +03:00
..
compiler_rt stage2: implement @setFloatMode 2022-07-23 15:40:12 +03:00
docs Autodoc: small polish on the html 2022-07-19 19:10:12 -07:00
include update C headers to LLVM 14.0.6 2022-07-03 15:58:39 -07:00
init-exe init-exe: add note about log_level in ReleaseSmall and ReleaseFast build mode (#11626) 2022-05-14 12:56:58 +02:00
init-lib flatten lib/std/special and improve "pkg inside another" logic 2022-05-06 22:41:00 -07:00
libc update macOS libc headers 2022-07-04 12:14:48 -07:00
libcxx libcxx: do not include __config_site 2022-07-02 20:40:59 -07:00
libcxxabi update libcxxabi to llvm 14.0.6 2022-07-01 16:39:29 -07:00
libunwind update libunwind to llvm 14.0.6 2022-07-01 16:39:31 -07:00
std std.json: expose encodeJsonString and encodeJsonStringChars 2022-07-24 11:51:59 +03:00
tsan update libcxx, libcxxabi, libunwind, and tsan to llvm 13 rc1 2021-08-16 23:32:13 -07:00
build_runner.zig flatten lib/std/special and improve "pkg inside another" logic 2022-05-06 22:41:00 -07:00
c.zig Sema: validate deref operator type and value 2022-07-01 10:22:25 +03:00
compiler_rt.zig stage2: lower float negation explicitly 2022-06-30 00:02:00 -07:00
ssp.zig flatten lib/std/special and improve "pkg inside another" logic 2022-05-06 22:41:00 -07:00
test_runner.zig std.Progress.log: adjust API 2022-05-26 21:58:19 -07:00