package hack_parallel

  1. Overview
  2. Docs
Legend:
Library
Module
Module type
Parameter
Class
Class type

* Copyright (c) 2015, Facebook, Inc. * All rights reserved. * * This source code is licensed under the BSD-style license found in the * LICENSE file in the "hack" directory of this source tree. An additional grant * of patent rights can be found in the PATENTS file in the same directory. *

* Hh_json parsing and pretty printing library.

type json =
  1. | JSON_Object of (string * json) list
  2. | JSON_Array of json list
  3. | JSON_String of string
  4. | JSON_Number of string
  5. | JSON_Bool of bool
  6. | JSON_Null
exception Syntax_error of string
val json_to_string : ?pretty:bool -> json -> string
val json_to_multiline : json -> string
val json_to_output : Stdlib.out_channel -> json -> unit
val json_of_string : ?strict:bool -> string -> json
val json_of_file : ?strict:bool -> string -> json
val get_object_exn : json -> (string * json) list
val get_array_exn : json -> json list
val get_string_exn : json -> string
val get_number_exn : json -> string
val get_number_int_exn : json -> int
val get_bool_exn : json -> bool
val opt_string_to_json : string option -> json
val opt_int_to_json : int option -> json
val int_ : int -> json
val string_ : string -> json

Types and functions for monadic API for traversing a JSON object.

type json_type =
  1. | Object_t
  2. | Array_t
  3. | String_t
  4. | Number_t
  5. | Integer_t
  6. | Bool_t
module type Access = sig ... end

* This module gives monadic recursive access to values within objects by key. * It uses the Result.t to manage control flow in the monad when an error is * encountered. It also tracks the backtrace of the keys accessed to give * detailed error messages. * * Usage: * To access the boolean value "qux" from the following json: * "foo": { "bar" : { "baz" : { "qux" : true

module Access : Access
OCaml

Innovation. Community. Security.