/** * Serializes the given object into a JSON-string. * * @param objectToSerialize The object to serialize. * * @returns The given object as a JSON-string. */ export declare function serializeJson(objectToSerialize: any): string; /** * Deserializes the given stringified object into a JSON object, if possible. * If the string represents an error, the result is automatically cast into a matching error type. * If the string does not represent an object, it is returned as it is. * * @param serializedObject The string representing the object to deserialize. * @param reviverFunction Optional: A function that transforms the results. * This function is called for each member of the object. * If a member contains nested objects, the nested objects are transformed before the parent object is. * * @typedef TResult The expected target type of the deserialized object. Defaults to any. * * @returns The deserialized object. */ export declare function deserializeJson(serializedObject: string, reviverFunction?: (key: string, value: any) => any): TResult;