UNPKG

@technobuddha/library

Version:
14 lines (13 loc) 670 B
import { type TBJsonValue } from './json.ts'; /** * Deserializes a value that may be a specially formatted JSON string. * * If the input is a string that starts with '⁅' and ends with '⁆', the function * removes these delimiters and parses the inner content as JSON. Otherwise, it * returns the value as-is, cast to `JsonValue`. * @param value - The value to deserialize, which may be a specially formatted JSON string. * @returns The deserialized `JsonValue` if the input was a specially formatted string, * or the original value cast as `JsonValue` otherwise. * @internal */ export declare function jsonDeserialize(value: unknown): TBJsonValue;