This release is versions behind 1.0.2 — the latest version of @std/jsonc.
Built and signed on GitHub ActionsBuilt and signed on GitHub Actions
Built and signed on GitHub Actions
Works with
•JSR Score100%•This package works with Cloudflare Workers, Node.js, Deno, Bun, Browsers




Downloads4,237/wk
•Published2 years ago (0.221.0)
Parsing and serializing of JSONC files
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.
Examples
Example 1
Example 1
import { parse } from "@std/jsonc"; parse('{"foo": "bar", } // comment'); // { foo: "bar" } parse('{"foo": "bar", } /* comment *\/'); // { foo: "bar" } parse('{"foo": "bar" } // comment', { allowTrailingComma: false, }); // { foo: "bar" }
Built and signed on
GitHub Actions
Add Package
deno add jsr:@std/jsonc
Import symbol
import * as jsonc from "@std/jsonc";
Import directly with a jsr specifier
import * as jsonc from "jsr:@std/jsonc";