Spec-Zone.ru › Deno 2

@std/jsonc

Overview

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" });

Add to your project

›_
deno add jsr:@std/jsonc

See all symbols in @std/jsonc on

© 2018–2025 the Deno authors
Licensed under the MIT License.
https://docs.deno.com/runtime/reference/std/jsonc

Spec-Zone.ru

Настройки Оффлайн Что нового Помощь О нас
Spec-Zone .ru
спецификации, руководства, описания, API