(close! x)Closes a schema or a message root; child views need no closing.
Closes a schema or a message root; child views need no closing.
(decode t wire)Decodes wire bytes to a persistent map. Unknown fields are preserved for re-encoding by the codec, but they have no schema names so they do not appear in the map; a truncated or malformed payload throws.
Decodes wire bytes to a persistent map. Unknown fields are preserved for re-encoding by the codec, but they have no schema names so they do not appear in the map; a truncated or malformed payload throws.
(decode-message t wire)Decodes wire bytes to a mutable message. No map materialization. Close it when done.
Decodes wire bytes to a mutable message. No map materialization. Close it when done.
(encode t m)Encodes a map to wire bytes. Unknown map keys are an error, not silence.
Encodes a map to wire bytes. Unknown map keys are an error, not silence.
(encode-delimited msg)One length-delimited frame (varint length + message).
One length-delimited frame (varint length + message).
(encode-deterministic msg)Wire bytes with map entries sorted by key, so equal messages encode to equal bytes regardless of insertion order.
Wire bytes with map entries sorted by key, so equal messages encode to equal bytes regardless of insertion order.
(encode-message msg)Encodes an already-filled mutable message. No map walk.
Encodes an already-filled mutable message. No map walk.
(fill-message! msg m)Fills a mutable message from a map (schema order, canonical bytes). For hot loops: fill once, encode-message many times.
Fills a mutable message from a map (schema order, canonical bytes). For hot loops: fill once, encode-message many times.
(from-json t text)(from-json t text ignore-unknown? limits)Parses JSON mapping text into a persistent map. Unknown field names throw
unless ignore-unknown? is true; limits is nil or a Java Limits.
Parses JSON mapping text into a persistent map. Unknown field names throw unless `ignore-unknown?` is true; `limits` is nil or a Java Limits.
(from-text t text)(from-text t text limits)Parses text format into a persistent map; limits is nil or a Limits.
Parses text format into a persistent map; `limits` is nil or a Limits.
(json-of-map t m)JSON mapping text for a map of this type.
JSON mapping text for a map of this type.
(load-schema path)Loads a descriptor set written by protoc --descriptor_set_out.
Loads a descriptor set written by `protoc --descriptor_set_out`.
(load-schema-bytes blob)Loads descriptor-set bytes; use --include_imports so every type resolves.
Loads descriptor-set bytes; use `--include_imports` so every type resolves.
(message-type schema full-name)Looks up a message by fully qualified name, e.g. "structtest.Scalars3".
Looks up a message by fully qualified name, e.g. "structtest.Scalars3".
(new-message t)A new mutable message of this type; close it when done. Fill once with fill-message!, then encode-message reuses it without a map walk.
A new mutable message of this type; close it when done. Fill once with fill-message!, then encode-message reuses it without a map walk.
(text-of-map t m)(text-of-map t m print-unknown?)Text format for a map of this type; unknown fields print unless
print-unknown? is false.
Text format for a map of this type; unknown fields print unless `print-unknown?` is false.
(to-json msg)Protobuf JSON mapping text of a message (mutable Message).
Protobuf JSON mapping text of a message (mutable Message).
(to-text msg)(to-text msg print-unknown?)Protobuf text format; unknown fields print as numeric lines unless
print-unknown? is false.
Protobuf text format; unknown fields print as numeric lines unless `print-unknown?` is false.
cljdoc builds & hosts documentation for Clojure/Script libraries
| Ctrl+k | Jump to recent docs |
| ← | Move to previous article |
| → | Move to next article |
| Ctrl+/ | Jump to the search field |