mirage/ezjsonm

An easy interface on top of the Jsonm library.

41

stars

134

commits

OCaml

primary language

Apr 28, 2025

updated

Browse cluster: OCaml Systems Programming & MirageOS

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"

Contributors

samoht

61 commits

djs55

21 commits

avsm

16 commits

dinosaure

14 commits

mirage/ezjsonm

An easy interface on top of the Jsonm library.

41

stars

134

commits

OCaml

primary language

Apr 28, 2025

updated

Browse cluster: OCaml Systems Programming & MirageOS

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"

Contributors

samoht

61 commits

djs55

21 commits

avsm

16 commits

dinosaure

14 commits

Languages

OCaml

99.1%