---
lang: en
title: 'API docs: rest.sanitizejsonparse'
keywords: LoopBack 4.0, LoopBack 4
sidebar: lb4_sidebar
permalink: /doc/en/lb4/apidocs.rest.sanitizejsonparse.html
---

<!-- Do not edit this file. It is automatically generated by API Documenter. -->

[Home](./index.md) &gt; [@loopback/rest](./rest.md) &gt; [sanitizeJsonParse](./rest.sanitizejsonparse.md)

## sanitizeJsonParse() function

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

<b>Signature:</b>

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

## Parameters

|  Parameter | Type | Description |
|  --- | --- | --- |
|  reviver | <code>(key: any, value: any) =&gt; any</code> | Reviver function |

<b>Returns:</b>

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


