/** * Parse a JSON string if defined, otherwise return the default value. * This is useful for parsing JSON strings from database storage. */ export declare function parseJsonIfDefined(value: string | null | undefined, defaultValue: T): T; /** * Parse a JSON metadata blob from the database. Returns the parsed value * only if it's a plain object (rejects arrays, primitives, and parse errors) * — those would be corruption or legacy rows we don't want to crash on. */ export declare function parseJsonObjectIfDefined(value: string | null | undefined): Record | undefined; /** * Parse multiple JSON string properties of an object. * Properties that are undefined or null will use their default values. * * @param obj - The source object containing JSON string properties to parse * @param propertyDefaults - Map of property names to their default values * @param target - The target object to write parsed values to (defaults to a new object based on obj) * @returns The target object with parsed properties * * @example * const source = { flags: '{"enabled":true}', sessions: null, name: "Test" }; * const result = parseJsonProperties(source, { flags: {}, sessions: {} }); * // result = { flags: {enabled: true}, sessions: {}, name: "Test" } */ export declare function parseJsonProperties>(obj: T, propertyDefaults: Partial>, target?: any): any;