2024-01-01 21:11:32 +00:00
|
|
|
// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.
|
2023-03-18 12:36:00 +00:00
|
|
|
// This module is browser compatible.
|
|
|
|
|
2024-02-27 19:28:34 +00:00
|
|
|
/**
|
2024-06-24 05:58:56 +00:00
|
|
|
* Provides tools for working with
|
|
|
|
* {@link https://code.visualstudio.com/docs/languages/json#_json-with-comments | JSONC}
|
|
|
|
* (JSON with comments).
|
|
|
|
*
|
|
|
|
* Currently, this module only provides a means of parsing JSONC. JSONC
|
|
|
|
* serialization is not yet supported.
|
2024-02-27 19:28:34 +00:00
|
|
|
*
|
docs(assert,cli,data-structures,expect,fmt,front-matter,html,http,jsonc,semver,streams,text,toml,webgpu): add snippet checks in module, function and class docs to doc checker (#4855)
* chore: add snippet checks to module docs
* fix
* work
* tweak
2024-05-31 02:01:46 +00:00
|
|
|
* ```ts
|
2024-04-29 02:57:30 +00:00
|
|
|
* import { parse } from "@std/jsonc";
|
refactor(assert,async,bytes,cli,collections,crypto,csv,data-structures,datetime,dotenv,encoding,expect,fmt,front-matter,fs,html,http,ini,internal,io,json,jsonc,log,media-types,msgpack,net,path,semver,streams,testing,text,toml,ulid,url,uuid,webgpu,yaml): import from `@std/assert` (#5199)
* refactor: import from `@std/assert`
* update
2024-06-30 08:30:10 +00:00
|
|
|
* import { assertEquals } from "@std/assert";
|
2024-02-27 19:28:34 +00:00
|
|
|
*
|
2024-06-03 04:10:27 +00:00
|
|
|
* assertEquals(parse('{"foo": "bar", } // comment'), { foo: "bar" });
|
|
|
|
* assertEquals(parse('{"foo": "bar", } /* comment *\/'), { foo: "bar" });
|
2024-02-27 19:28:34 +00:00
|
|
|
* ```
|
|
|
|
*
|
|
|
|
* @module
|
|
|
|
*/
|
2023-03-13 05:58:26 +00:00
|
|
|
export * from "./parse.ts";
|