@std/jsonc
Обзор
Предоставляет инструменты для работы с JSONC (JSON с комментариями).
В настоящее время этот модуль позволяет только анализировать JSONC. Сериализация JSONC пока не поддерживается.
import { parse } from "@std/jsonc";
import { assertEquals } from "@std/assert";
assertEquals(parse('{"foo": "bar", } // comment'), { foo: "bar" });
assertEquals(parse('{"foo": "bar", } /* comment *\/'), { foo: "bar" });
Добавление в проект
›_
deno add jsr:@std/jsonc
© 2018–2025 the Deno authors
Licensed under the MIT License.
https://docs.deno.com/runtime/reference/std/jsonc