Legend:
Library
Module
Module type
Parameter
Class
Class type
Library
Module
Module type
Parameter
Class
Class type
type param = {
deref : (Ag_ocaml.atd_ocaml_repr, Ag_json.json_repr) Ag_mapping.mapping ->
(Ag_ocaml.atd_ocaml_repr, Ag_json.json_repr) Ag_mapping.mapping;
std : bool;
unknown_field_handler : string option;
constr_mismatch_handler : string option;
force_defaults : bool;
preprocess_input : string option;
ocaml_version : (int * int) option;
}
val make_ocaml_json_intf :
with_create:bool ->
Buffer.t ->
((Ag_ocaml.atd_ocaml_repr, 'a) Ag_mapping.mapping ->
(Ag_ocaml.atd_ocaml_repr, 'b) Ag_mapping.mapping) ->
('c * (Ag_ocaml.atd_ocaml_repr, 'a) Ag_mapping.def list) list ->
unit
val is_json_string :
(('a, 'b) Ag_mapping.mapping -> ('a, 'b) Ag_mapping.mapping) ->
('a, 'b) Ag_mapping.mapping ->
bool
val get_assoc_type :
(([> `Tuple ] as 'a, [> `Tuple ] as 'b) Ag_mapping.mapping ->
('a, 'b) Ag_mapping.mapping) ->
Atd_ast.loc ->
('a, 'b) Ag_mapping.mapping ->
('a, 'b) Ag_mapping.mapping * ('a, 'b) Ag_mapping.mapping
type parse_field = {
mapping : (Ag_oj_mapping.o, Ag_oj_mapping.j) Ag_mapping.field_mapping;
default : default_field;
ocamlf : Ag_ocaml.atd_ocaml_field;
jsonf : Ag_json.json_field;
field_ref : string;
constructor : int option;
payloads : int list;
implicit : bool;
}
val get_fields :
param ->
(Ag_oj_mapping.o, Ag_oj_mapping.j) Ag_mapping.field_mapping array ->
parse_field array
val get_writer_name :
?paren:bool ->
?name_f:(string -> string) ->
param ->
Ag_oj_mapping.oj_mapping ->
string
val get_left_writer_name : param -> string -> string list -> string
val get_left_to_string_name : param -> string -> string list -> string
val get_reader_name :
?paren:bool ->
?name_f:(string -> string) ->
'a ->
Ag_oj_mapping.oj_mapping ->
string
val destruct_sum :
Ag_oj_mapping.oj_mapping ->
string
* (Ag_ocaml.atd_ocaml_repr, Ag_json.json_repr) Ag_mapping.variant_mapping
array
val make_sum_writer :
param ->
(Ag_ocaml.atd_ocaml_repr, Ag_json.json_repr) Ag_mapping.mapping ->
(param ->
string ->
Ag_ocaml.atd_ocaml_variant ->
Ag_json.json_variant ->
(Ag_ocaml.atd_ocaml_repr, Ag_json.json_repr) Ag_mapping.variant_mapping ->
Ag_indent.t list) ->
[> `Annot of string * [> `Line of string ] | `Block of Ag_indent.t list ]
list
val is_optional : parse_field -> bool
val unwrap :
param ->
parse_field ->
(Ag_ocaml.atd_ocaml_repr, Ag_json.json_repr) Ag_mapping.mapping
val string_expr_of_constr_field :
param ->
(parse_field -> string) ->
parse_field ->
[> `Annot of string * [> `Line of string ]
| `Block of Ag_indent.t list
| `Line of string ]
list
val make_writer : param -> Ag_oj_mapping.oj_mapping -> Ag_indent.t list
val make_variant_writer :
param ->
string ->
Ag_ocaml.atd_ocaml_variant ->
Ag_json.json_variant ->
(Ag_ocaml.atd_ocaml_repr, Ag_json.json_repr) Ag_mapping.variant_mapping ->
Ag_indent.t list
val make_deconstructed_writer :
(Ag_indent.t -> Ag_indent.t) ->
(string -> Ag_indent.t) ->
param ->
string ->
Ag_ocaml.atd_ocaml_variant ->
Ag_json.json_variant ->
(Ag_ocaml.atd_ocaml_repr, Ag_json.json_repr) Ag_mapping.variant_mapping ->
Ag_indent.t list
val make_record_writer :
param ->
(Ag_oj_mapping.o, Ag_oj_mapping.j) Ag_mapping.field_mapping array ->
Ag_ocaml.atd_ocaml_record ->
Ag_indent.t list
val study_record :
param ->
parse_field array ->
[> `Inline of [> `Line of string ] list | `Line of string ] list
* [> `Line of string ] list
* (int ->
[> `Line of string ])
* [> `Line of string ] list
* [> `Block of [> `Block of 'a list | `Line of string ] list
| `Line of string ]
list
val make_reader :
param ->
string option ->
Ag_oj_mapping.oj_mapping ->
Ag_indent.t list
val make_variant_reader :
param ->
string option ->
string ->
bool ->
(Ag_ocaml.atd_ocaml_repr, Ag_json.json_repr) Ag_mapping.variant_mapping ->
string * Ag_indent.t list
val make_deconstructed_reader :
param ->
Atd_ast.loc ->
parse_field array ->
(int -> Ag_indent.t) ->
Ag_indent.t list
val make_record_reader :
param ->
string option ->
Ag_mapping.loc ->
(Ag_oj_mapping.o, Ag_oj_mapping.j) Ag_mapping.field_mapping array ->
Ag_ocaml.atd_ocaml_record ->
Ag_indent.t list
val make_tuple_reader :
param ->
(Ag_ocaml.atd_ocaml_repr, Ag_json.json_repr) Ag_mapping.cell_mapping array ->
Ag_indent.t list
val make_ocaml_json_writer :
param ->
original_types:(string, string * int) Hashtbl.t ->
bool ->
string ->
string ->
(Ag_ocaml.atd_ocaml_repr, Ag_json.json_repr) Ag_mapping.def ->
[> `Block of Atd_indent.t list | `Line of string ] list
val make_ocaml_json_reader :
param ->
original_types:(string, string * int) Hashtbl.t ->
bool ->
string ->
string ->
(Ag_ocaml.atd_ocaml_repr, Ag_json.json_repr) Ag_mapping.def ->
[> `Block of Atd_indent.t list | `Line of string ] list
val make_ocaml_json_impl :
std:bool ->
unknown_field_handler:string option ->
constr_mismatch_handler:string option ->
with_create:bool ->
force_defaults:bool ->
preprocess_input:string option ->
original_types:(string, string * int) Hashtbl.t ->
ocaml_version:(int * int) option ->
Buffer.t ->
((Ag_ocaml.atd_ocaml_repr, Ag_json.json_repr) Ag_mapping.mapping ->
(Ag_ocaml.atd_ocaml_repr, Ag_json.json_repr) Ag_mapping.mapping) ->
(bool * (Ag_ocaml.atd_ocaml_repr, Ag_json.json_repr) Ag_mapping.def list)
list ->
unit
val translate_mapping :
(bool * Atd_ast.module_body) list ->
(bool * (Ag_ocaml.atd_ocaml_repr, Ag_json.json_repr) Ag_mapping.def list)
list
val write_opens : Buffer.t -> string list -> unit
val make_mli :
header:string ->
opens:string list ->
with_typedefs:bool ->
with_create:bool ->
with_fundefs:bool ->
string ->
((Ag_ocaml.atd_ocaml_repr, 'a) Ag_mapping.mapping ->
(Ag_ocaml.atd_ocaml_repr, 'b) Ag_mapping.mapping) ->
('c * (Ag_ocaml.atd_ocaml_repr, 'a) Ag_mapping.def list) list ->
string
val make_ml :
header:string ->
opens:string list ->
with_typedefs:bool ->
with_create:bool ->
with_fundefs:bool ->
std:bool ->
unknown_field_handler:string option ->
constr_mismatch_handler:string option ->
force_defaults:bool ->
preprocess_input:string option ->
original_types:(string, string * int) Hashtbl.t ->
ocaml_version:(int * int) option ->
string ->
((Ag_ocaml.atd_ocaml_repr, Ag_json.json_repr) Ag_mapping.mapping ->
(Ag_ocaml.atd_ocaml_repr, Ag_json.json_repr) Ag_mapping.mapping) ->
(bool * (Ag_ocaml.atd_ocaml_repr, Ag_json.json_repr) Ag_mapping.def list)
list ->
string
val make_ocaml_files :
opens:string list ->
with_typedefs:bool ->
with_create:bool ->
with_fundefs:bool ->
all_rec:bool ->
std:bool ->
unknown_field_handler:string option ->
constr_mismatch_handler:string option ->
pos_fname:string option ->
pos_lnum:int option ->
type_aliases:string option ->
force_defaults:bool ->
preprocess_input:string option ->
name_overlap:bool ->
ocaml_version:(int * int) option ->
pp_convs:[ `Camlp4 of string list | `Ppx of string list ] ->
string option ->
[< `Files of string | `Stdout ] ->
unit