Skip to main content
Home

@std/jsonc@1.0.2
Built and signed on GitHub Actions

Works with
This package works with Cloudflare Workers, Node.js, Deno, Bun, Browsers
This package works with Cloudflare Workers
This package works with Node.js
This package works with Deno
This package works with Bun
This package works with Browsers
JSR Score100%
Downloads5,776/wk
Published10 months ago (1.0.2)

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.

import { parse } from "@std/jsonc";
import { assertEquals } from "@std/assert";

assertEquals(parse('{"foo": "bar", } // comment'), { foo: "bar" });
assertEquals(parse('{"foo": "bar", } /* comment *\/'), { foo: "bar" });
Built and signed on
GitHub Actions

Report package

Please provide a reason for reporting this package. We will review your report and take appropriate action.

Please review the JSR usage policy before submitting a report.

Add Package

deno add jsr:@std/jsonc

Import symbol

import * as jsonc from "@std/jsonc";
or

Import directly with a jsr specifier

import * as jsonc from "jsr:@std/jsonc";