Expand description
The ParseValue model: every JSON value a client can send or receive in an object body.
Two decisions here are load-bearing, and both look like mistakes until the reason is stated.
ParseMap preserves key order. Several upstream behaviors iterate object keys, and the
resulting order is observable in golden-file comparison even where it is not semantically
meaningful. A HashMap destroys it on every round trip and makes snapshot testing impossible.
Nothing here derives PartialEq. A derived one would compile, read as correct, and get
both float edge cases backwards at the one call site that decides which keys a client is told
about. Use deep_strict_eq, which implements Node’s util.isDeepStrictEqual semantics.
Enums§
- Parse
Value - A Parse value.
Functions§
- base64_
decode - base64_
encode - Standard base64 with padding, matching what
BytesCoderaccepts (MongoTransform.js:1306). Hand-rolled to keepparse-rust-coredependency-light; it is 20 lines and the alphabet is fixed by the wire format. Base64, as the{"__type":"Bytes","base64":...}envelope spells it. - deep_
strict_ eq - Deep equality with Node’s
util.isDeepStrictEqualsemantics. - is_
base64_ value - The inverse. Rejects any character outside the alphabet rather than skipping it, because a
lenient decoder would silently accept a corrupted payload from an untrusted client.
Does this string match
BytesCoder.base64Pattern?
Type Aliases§
- Parse
Map - An order-preserving string-keyed map. See the module note.