Page Contents

Home > @loopback/rest > sanitizeJsonParse

sanitizeJsonParse() function

Factory to create a reviver function for JSON.parse to sanitize keys

Signature:

export declare function sanitizeJsonParse(reviver?: (key: any, value: any) => any): (key: string, value: any) => any;

Parameters

Parameter Type Description
reviver (key: any, value: any) => any Reviver function

Returns:

(key: string, value: any) => any