-
Notifications
You must be signed in to change notification settings - Fork 629
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
docs(jsonc): add module-level docs (#4402)
* docs(jsonc): add module-level docs * Yoshiya's suggestion
- Loading branch information
Showing
2 changed files
with
24 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,24 @@ | ||
// 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"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters