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 float_to_string(value: Float) -> String

Convert a float to a string with 1 decimal place

pub fn parse_json_number(
  json: String,
  field: String,
) -> Result(Float, String)

Parse the JSON string and return the value of the given field. Parse a JSON string and return the float value of a given field.

pub fn parse_json_string(json: String, field: String) -> String

Parse a JSON string and return the string value of a given field.

Search Document