package ezjsonm

  1. Overview
  2. Docs
An easy interface on top of the Jsonm library

Install

Dune Dependency

Authors

Maintainers

Sources

ezjsonm-0.5.0.tbz
sha256=16ca3b0ad22a4299e52bf73892b68ca232eb1b7b7ef7e8f1f7686750042e719a
md5=3a081dee6fc0cc0ce9462986888fa0bf

Description

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 library and use it directly, rather than be saddled with the Ezjsonm interface.

Tags

org:mirage org:ocamllabs

Published: 26 May 2017

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 (6)

  1. hex
  2. sexplib
  3. jsonm >= "0.9.1"
  4. jbuilder >= "1.0+beta9"
  5. ocamlfind build
  6. ocaml

Dev Dependencies (1)

  1. alcotest with-test & >= "0.4.0"

Conflicts

None

OCaml

Innovation. Community. Security.