gossamer/json
A transparent Json type for inspecting or pattern-matching on JSON
of unknown structure. For typed encode/decode pipelines, use
gleam_json.
Types
A JSON value.
pub type Json {
Null
Boolean(Bool)
Number(Float)
String(String)
Array(List(Json))
Object(dict.Dict(String, Json))
}
Constructors
-
NullThe JSON
nullliteral. -
Boolean(Bool)A JSON boolean —
trueorfalse. -
Number(Float)A JSON number. JSON has no distinction between integers and floats; all numeric values are decoded as
Float. -
String(String)A JSON string.
-
Array(List(Json))A JSON array — an ordered sequence of values.
-
A JSON object — a string-keyed map of values.