deno.land / std@0.224.0 / jsonc / mod.ts

View Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.// This module is browser compatible.
/** * Provides tools for working with JSONC (JSON with comments). Currently, this * module only provides a means of parsing JSONC. JSONC serialization is not * yet supported. * * This module is browser compatible. * * @example * ```ts Parsing JSONC * import { parse } from "https://deno.land/std@$STD_VERSION/jsonc/mod.ts"; * * parse('{"foo": "bar", } // comment'); // { foo: "bar" } * parse('{"foo": "bar", } /* comment *\/'); // { foo: "bar" } * parse('{"foo": "bar" } // comment', { * allowTrailingComma: false, * }); // { foo: "bar" } * ``` * * @module */export * from "./parse.ts";
std

Version Info

Tagged at
6 months ago