Skip to content

Json package

This package provides a JSON parser.

{
  "type": "library"
}

Install

{
  "dependencies": {
    "Json": "pen:///json"
  } 
}

Json'Decode module

Types

No types are defined.

Functions

Decode

Decode a string into a JSON value.

\(s string) Value | error

Json'Encode module

Types

No types are defined.

Functions

Encode

Encode a JSON value.

\(v Value) string

Json'Value module

Types

Value

A JSON value

type Value {
  # ...
}

Raw

A raw JSON value represented by built-in types

type Raw = boolean | none | number | string | [Value] | {string: Value}

Functions

New

Create a JSON value.

\(r Raw) Value

Raw

Get a raw value.

\(v Value) Raw