Skip to main content
Module

x/pazza/examples/json.test.ts

Parser combinators library designed for Deno, but also works on browsers and Node.js.
Go to Latest
File
import { assertEquals } from "https://deno.land/std@0.70.0/testing/asserts.ts";import { jsonValue } from "./json.ts";
Deno.test("jsonParser", () => { const result = jsonValue()(` [ 2, -43.21, true, "test", "\\n\\"\\t", false, { "a": "b", "c": null } ] `);
assertEquals(result, { ok: true, input: "\n ", output: [ 2, -43.21, true, "test", '\n"\t', false, { "a": "b", "c": null, }, ], context: {}, });});