glee
Glee A simple way to parse JSON without having to implement the JSON module. +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ This is my first time using Gleam, so I’m sure there are some things that could be done better.
Functions
pub fn extract_value_from_json(
json: String,
parent: String,
key: String,
) -> String
Extract a value from a JSON string by specifying the parent and key.
pub fn parse_json_float(
json: String,
field: String,
) -> Result(Float, String)
Parse a JSON string and return the float value of a given field.
pub fn parse_json_int(
json: String,
field: String,
) -> Result(Int, String)
Parse a JSON string and return the int value of a given field.
pub fn parse_json_string(
json: String,
field: String,
) -> Result(String, String)
Parse a JSON string and return the string value of a given field.