glindo/examples/json

Types

pub type JsonError(str) {
  JsonError(message: str)
}

Constructors

  • JsonError(message: str)
pub type JsonValue {
  JsonNull
  JsonBool(Bool)
  JsonNumber(Int)
  JsonString(String)
  JsonArray(List(JsonValue))
  JsonObject(List(#(String, JsonValue)))
}

Constructors

  • JsonNull
  • JsonBool(Bool)
  • JsonNumber(Int)
  • JsonString(String)
  • JsonArray(List(JsonValue))
  • JsonObject(List(#(String, JsonValue)))

Functions

pub fn json_array() -> Parser(JsonValue)
pub fn json_bool() -> Parser(JsonValue)
pub fn json_null() -> Parser(JsonValue)
pub fn json_number() -> Parser(JsonValue)
pub fn json_object() -> Parser(JsonValue)
pub fn json_string() -> Parser(JsonValue)
pub fn json_value() -> Parser(JsonValue)
pub fn parse_json(string: String) -> Result(JsonValue, String)
pub fn print_json(jval: JsonValue, level: Int) -> String
Search Document