Versions 166 to 318
Lines 1–27 at 318 (were 1–7 at 166)
1+/** Internal values may expose an exact streaming representation without changing public toJSON. */
6+
17+
4−export function* jsonValueChunks(input: unknown): IterableIterator<string> {
Lines 36–74 at 318 (were 16–35 at 166)
21− if (typeof toJSON === "function") return toJSON.call(value, key);
46+ if (options.unboxPrimitives && (value instanceof String || value instanceof Number || value instanceof Boolean))
2550 const omitted = (value: unknown) => value === undefined || typeof value === "function" || typeof value === "symbol";
27− if (typeof value === "string") yield* string(value);
56+ if (typeof chunk !== "string" || chunk.length > 16384) throw Error("JSON string chunk exceeds bound");
2867 else if (value === null || typeof value === "boolean" || typeof value === "number") yield JSON.stringify(value);
2968 else if (typeof value !== "object" || value === null) throw Error("unsupported canonical JSON value");
32− if (active.size >= 128) throw Error("canonical JSON depth exceeds bound");
71+ if (active.size >= (options.maxDepth ?? 128)) throw Error("canonical JSON depth exceeds bound");
- MCP
- compare on this site's /mcp
- CLI
- abso diff 166 318 src/engine/json-value-chunks.ts --json
- JSON
- /christopher/abso-core/compare/166..318?file=src%2Fengine%2Fjson-value-chunks.ts&format=json