Skip to content

A library for parsing, manipulating, and serializing data structured as JSON.

License

MIT, Unknown licenses found

Licenses found

MIT
LICENSE.md
Unknown
LICENSE-Inhabited-Type.txt
Notifications You must be signed in to change notification settings

stjordanis/jsonaf

 
 

Jsonaf

This is a library for parsing, manipulating, and serializing data structured as JSON. It's built on the Angstrom and Faraday libraries. The underlying type is a simple polymorphic type:

type t =
  [ `Null
  | `False
  | `True
  | `String of string
  | `Number of string
  | `Object of (string * t) list
  | `Array of t list
  ]

Note that Number has a type of string! This is intentional, as it is left up to the user to decide how numbers should be interpreted. Certain fields might be integers while others might be floats.

The most bare-bones use case of this library is to pattern match on the type above and use the following two functions:

val of_string : string -> t
val to_string : t -> string

Jsonaf_kernel

The kernel library simply contains the type and functions to serialize and deserialize the type to a string. It has no other dependencies outside of Angstrom and Faraday.

About

A library for parsing, manipulating, and serializing data structured as JSON.

Resources

License

MIT, Unknown licenses found

Licenses found

MIT
LICENSE.md
Unknown
LICENSE-Inhabited-Type.txt

Code of conduct

Security policy

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • OCaml 99.3%
  • Other 0.7%