Skip to main content
Module

x/json5/mod.ts>parse

JSON5 for Deno
Latest
function parse
import { parse } from "https://deno.land/x/json5@v1.0.0/mod.ts";

Converts a JSON5 string into an object.

Type Parameters

optional
T = any

Type of return value.

Parameters

text: string

A valid JSON string.

optional
reviver: ((
this: any,
key: string,
value: any,
) => any | null)

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.