package ezjsonm-lwt

  1. Overview
  2. Docs
Simple Lwt-based interface to the Jsonm JSON library

Install

Dune Dependency

Authors

Maintainers

Sources

ezjsonm-1.3.0.tbz
sha256=08633e0f0e767a8ae81935ca7e74f1693b85a79c4502d568eedff5170f0cd77b
sha512=b731036384115603af9187464695418d27b7cf6f763c8dbc0812db62a7657cac1b6019d3b205b1c95ae81b7dab0bd4037390d977ee8c122bef29a9ddef771e18

Description

This simple interface over the Jsonm library provides an Lwt variant of the serialisation functions.

Tags

org:mirage org:ocamllabs

Published: 13 Nov 2021

README

Ezjsonm

An easy interface on top of the Jsonm library.

This version provides more convenient (but far less flexible) input and output functions that go to and from [string] values. This avoids the need to write signal code, which is useful for quick scripts that manipulate JSON.

More advanced users should go straight to the Jsonm[1] library and use it directly, rather than be saddled with the Ezjsonm interface.

Examples

For instance, you can explore the HTTP status code specified in the JSON format here. After downloading that file, you can open an OCaml toplevel and write:

# #require "ezjsonm";;
# let json = Ezjsonm.from_channel (open_in "4.json");;
# Ezjsonm.(get_string (find json ["codes"; "418"; "summary"]))
- : string = "I'm a teapot"

Dependencies (7)

  1. lwt >= "2.5.0"
  2. hex
  3. sexplib
  4. jsonm >= "1.0.0"
  5. dune >= "2.0"
  6. ezjsonm = version
  7. ocaml

Dev Dependencies (4)

  1. js_of_ocaml-compiler with-test
  2. conf-npm with-test
  3. ppx_sexp_conv with-test & >= "v0.12.0"
  4. alcotest with-test & >= "1.2.0"

Used by

None

Conflicts

None

OCaml

Innovation. Community. Security.