package jsonaf

  1. Overview
  2. Docs
A library for parsing, manipulating, and serializing data structured as JSON

Install

Dune Dependency

Authors

Maintainers

Sources

jsonaf-v0.16.0.tar.gz
sha256=0c85230d47dcc80c428ad82e0f2cb0ecbb5048129eaa036aeeb4cfb8d9d2063f

doc/jsonaf.kernel/Jsonaf_kernel/Serializer/index.html

Module Jsonaf_kernel.SerializerSource

Sourceval serialize : t -> Faraday.t -> unit

Serialize a json object without any unnecessary whitespace.

Sourceval run : t -> string

Convert a json object to a string as serialize would.

Sourceval serialize_hum : spaces:int -> t -> Faraday.t -> unit

serialize_hum ~spaces t serializes t in a “human readable” form with newlines separating elements of objects and arrays and an additional indentation of spaces spaces for their contents. A typical choice is ~spaces:2.

Passing ~spaces:0 gives the exact same output as serialize.

Sourceval run_hum : spaces:int -> t -> string

run_hum ~spaces, t should produce very similar output to JSON.stringify(t,null,spaces) in JavaScript.

OCaml

Innovation. Community. Security.