import type { JSONArray, JSONObject, JSONPrimitive, JSONSerializable } from "@rickosborne/typical"; import { type ValidationProblem } from "./validate.js"; /** * Try to validate the given value could be serialized as a JSON Object * without losing information. An empty result array means the value * is a valid JSON Object. */ export declare function validateJSONObject(value: unknown, seen?: Map, path?: string[]): ValidationProblem[]; /** * Type guard for values which could be serialized as JSON Objects. */ export declare function isJSONObject(value: unknown): value is JSONObject; /** * Try to validate the given value's items could be serialized as a * JSON Array without losing information. An empty result array * implies the value is a valid JSON Array. */ export declare function validateJSONArray(value: unknown, seen?: Map, path?: string[]): ValidationProblem[]; /** * Type guard testing whether the value could be serialized as a JSON * Array without losing information. */ export declare function isJSONArray(value: unknown): value is JSONArray; /** * Try to validate the given value could be serialized as a JSON literal * primitive without losing information. An empty result array implies * the value is a valid JSON primitive. */ export declare function validateJSONPrimitive(value: unknown, path?: string[]): ValidationProblem[]; /** * Type guard validating the value could be serialized as a JSON primitive. */ export declare function isJSONPrimitive(value: unknown): value is JSONPrimitive; /** * Try to validate that the given value could be serialized correctly * as JSON without losing information. An empty result array implies * the value is valid JSON. */ export declare function validateJSONSerializable(value: unknown, seen?: Map, path?: string[]): ValidationProblem[]; /** * Type guard for any value which could be serialized natively as JSON. */ export declare function isJSONSerializable(value: unknown): value is JSONSerializable; /** * Assert the given value could be serialized as a JSON Object. */ export declare function assertJSONObject(value: unknown): asserts value is JSONObject; /** * Assert the given value could be serialized as a JSON Array. */ export declare function assertJSONArray(value: unknown): asserts value is JSONArray; /** * Assert the given value could be serialized as a JSON Primitive. */ export declare function assertJSONPrimitive(value: unknown): asserts value is JSONPrimitive; /** * Assert the given value could be serialized as JSON. */ export declare function assertJSONSerializable(value: unknown): asserts value is JSONSerializable; //# sourceMappingURL=json.d.ts.map