jasper
Types
pub type JsonObject =
Dict(String, JsonValue)
pub type JsonParseError {
UnexpectedToken(found: Char)
UnexpectedEndOfInput
}
Constructors
-
UnexpectedToken(found: Char)
-
UnexpectedEndOfInput
pub type JsonQuery {
Root
Key(JsonQuery, key: String)
Index(JsonQuery, index: Int)
}
Constructors
-
Root
-
Key(JsonQuery, key: String)
-
Index(JsonQuery, index: Int)
pub type JsonQueryError {
UnexpectedType(JsonValue)
MissingObjectKey(JsonValue, key: String)
IndexOutOfBounds(JsonValue, index: Int)
}
Constructors
-
UnexpectedType(JsonValue)
-
MissingObjectKey(JsonValue, key: String)
-
IndexOutOfBounds(JsonValue, index: Int)
Functions
pub fn parse_json(
value: String,
) -> Result(JsonValue, JsonParseError)
pub fn query_json(
json: JsonValue,
query: JsonQuery,
) -> Result(JsonValue, JsonQueryError)