API reference › @evolu/common › Type › Json
const Json: brand(
"Json",
String,
(value: string) => {
const result = jsonToJsonValueResult(value);
return result.ok ? ok() : result;
},
formatJsonError,
);
Defined in: packages/common/src/Type.ts:21428
A String Brand proving that its exact text parses to JsonValue.
The Brand preserves whitespace, property order, and number spelling. Convert it to JsonValue through JsonValueFromJson or jsonToJsonValue.