element.version === currentVersion)) { versionNodes.unshift({ version: currentVersion, url: "#" }); } document.querySelector("#project-version").innerHTML = versionNodes.reduce( (acc, element) => { const status = currentVersion === element.version ? "selected disabled" : ""; return ` ${acc} `; }, `
json_value · v1.0.0

json_value

Package Version Hex Docs

gleam add json_value@1
import json_value

pub fn main() -> Nil {
  // decode into json_value.JsonValue value
  let assert Ok(json_data) = json.parse("[1, 2, null]", json_value.decode())

  // convert back to a String
  json_value.to_string(json_data)

  // convert it to a `json.Json` so it can used in another Json structure
  json.object([
    #("data", json_value.to_json(json_data))
  ])
}

Further documentation can be found at https://hexdocs.pm/json_value.

Development

gleam run   # Run the project
gleam test  # Run the tests
Search Document