An open API service indexing awesome lists of open source software.

https://github.com/zachary822/json-parser

JSON parser
https://github.com/zachary822/json-parser

deno json parser-combinators

Last synced: about 2 months ago
JSON representation

JSON parser

Awesome Lists containing this project

README

          

# JSON Parser

```typescript
import { jsonValue, snd, strToList } from "@fun/json-parser";

const input = strToList('"abc"');

const maybeParse = jsonValue(input);

// retrieving the value from Maybe
const result = maybeParse(
// default return value if parser doesn't match input
null,
// the javascript object from the JSON string
(x) => snd(x),
);
```