Module Cosmos.Json_converter_j

type user = Json_converter_t.user = {
id : string;
rid : string;
ts : int;
self : string;
etag : string;
permissions : string;
}
type parameter = Json_converter_t.parameter = {
name : string;
value : string;
}
type query = Json_converter_t.query = {
query : string;
parameters : parameter list;
}
type partitionKey_result = Json_converter_t.partitionKey_result = {
paths : string list;
kind : string;
}
type list_users = Json_converter_t.list_users = {
rid : string;
users : user list;
count : int;
}
type database = Json_converter_t.database = {
id : string;
_rid : string;
_self : string;
_etag : string;
_colls : string;
_users : string;
_ts : int;
}
type list_databases = Json_converter_t.list_databases = {
_rid : string;
databases : database list;
_count : int;
}
type indexes = Json_converter_t.indexes = {
dataType : string;
precision : int;
kind : string;
}
type included_paths = Json_converter_t.included_paths = {
path : string;
indexes : indexes list;
}
type indexing_policy = Json_converter_t.indexing_policy = {
automatic : bool;
indexing_mode : string;
included_paths : included_paths list;
}
type collection = Json_converter_t.collection = {
id : string;
indexing_policy : indexing_policy;
partition_key : partitionKey_result option;
rid : string;
ts : int;
self : string;
etag : string;
docs : string;
sprocs : string;
triggers : string;
udfs : string;
conflicts : string;
}
type list_collections = Json_converter_t.list_collections = {
rid : string;
document_collections : collection list;
count : int;
}
type create_user = Json_converter_t.create_user = {
id : string;
}
type create_partition_key = Json_converter_t.create_partition_key = {
paths : string list;
kind : string;
version : int option;
}
type create_database = Json_converter_t.create_database = {
id : string;
}
type create_collection = Json_converter_t.create_collection = {
id : string;
indexing_policy : indexing_policy option;
partition_key : create_partition_key option;
}
val write_user : Bi_outbuf.t -> user -> unit

Output a JSON value of type user.

val string_of_user : ?⁠len:int -> user -> string

Serialize a value of type user into a JSON string.

parameter len

specifies the initial length of the buffer used internally. Default: 1024.

val read_user : Yojson.Safe.lexer_state -> Stdlib.Lexing.lexbuf -> user

Input JSON data of type user.

val user_of_string : string -> user

Deserialize JSON data of type user.

val write_parameter : Bi_outbuf.t -> parameter -> unit

Output a JSON value of type parameter.

val string_of_parameter : ?⁠len:int -> parameter -> string

Serialize a value of type parameter into a JSON string.

parameter len

specifies the initial length of the buffer used internally. Default: 1024.

val read_parameter : Yojson.Safe.lexer_state -> Stdlib.Lexing.lexbuf -> parameter

Input JSON data of type parameter.

val parameter_of_string : string -> parameter

Deserialize JSON data of type parameter.

val write_query : Bi_outbuf.t -> query -> unit

Output a JSON value of type query.

val string_of_query : ?⁠len:int -> query -> string

Serialize a value of type query into a JSON string.

parameter len

specifies the initial length of the buffer used internally. Default: 1024.

val read_query : Yojson.Safe.lexer_state -> Stdlib.Lexing.lexbuf -> query

Input JSON data of type query.

val query_of_string : string -> query

Deserialize JSON data of type query.

val write_partitionKey_result : Bi_outbuf.t -> partitionKey_result -> unit

Output a JSON value of type partitionKey_result.

val string_of_partitionKey_result : ?⁠len:int -> partitionKey_result -> string

Serialize a value of type partitionKey_result into a JSON string.

parameter len

specifies the initial length of the buffer used internally. Default: 1024.

val read_partitionKey_result : Yojson.Safe.lexer_state -> Stdlib.Lexing.lexbuf -> partitionKey_result

Input JSON data of type partitionKey_result.

val partitionKey_result_of_string : string -> partitionKey_result

Deserialize JSON data of type partitionKey_result.

val write_list_users : Bi_outbuf.t -> list_users -> unit

Output a JSON value of type list_users.

val string_of_list_users : ?⁠len:int -> list_users -> string

Serialize a value of type list_users into a JSON string.

parameter len

specifies the initial length of the buffer used internally. Default: 1024.

val read_list_users : Yojson.Safe.lexer_state -> Stdlib.Lexing.lexbuf -> list_users

Input JSON data of type list_users.

val list_users_of_string : string -> list_users

Deserialize JSON data of type list_users.

val write_database : Bi_outbuf.t -> database -> unit

Output a JSON value of type database.

val string_of_database : ?⁠len:int -> database -> string

Serialize a value of type database into a JSON string.

parameter len

specifies the initial length of the buffer used internally. Default: 1024.

val read_database : Yojson.Safe.lexer_state -> Stdlib.Lexing.lexbuf -> database

Input JSON data of type database.

val database_of_string : string -> database

Deserialize JSON data of type database.

val write_list_databases : Bi_outbuf.t -> list_databases -> unit

Output a JSON value of type list_databases.

val string_of_list_databases : ?⁠len:int -> list_databases -> string

Serialize a value of type list_databases into a JSON string.

parameter len

specifies the initial length of the buffer used internally. Default: 1024.

val read_list_databases : Yojson.Safe.lexer_state -> Stdlib.Lexing.lexbuf -> list_databases

Input JSON data of type list_databases.

val list_databases_of_string : string -> list_databases

Deserialize JSON data of type list_databases.

val write_indexes : Bi_outbuf.t -> indexes -> unit

Output a JSON value of type indexes.

val string_of_indexes : ?⁠len:int -> indexes -> string

Serialize a value of type indexes into a JSON string.

parameter len

specifies the initial length of the buffer used internally. Default: 1024.

val read_indexes : Yojson.Safe.lexer_state -> Stdlib.Lexing.lexbuf -> indexes

Input JSON data of type indexes.

val indexes_of_string : string -> indexes

Deserialize JSON data of type indexes.

val write_included_paths : Bi_outbuf.t -> included_paths -> unit

Output a JSON value of type included_paths.

val string_of_included_paths : ?⁠len:int -> included_paths -> string

Serialize a value of type included_paths into a JSON string.

parameter len

specifies the initial length of the buffer used internally. Default: 1024.

val read_included_paths : Yojson.Safe.lexer_state -> Stdlib.Lexing.lexbuf -> included_paths

Input JSON data of type included_paths.

val included_paths_of_string : string -> included_paths

Deserialize JSON data of type included_paths.

val write_indexing_policy : Bi_outbuf.t -> indexing_policy -> unit

Output a JSON value of type indexing_policy.

val string_of_indexing_policy : ?⁠len:int -> indexing_policy -> string

Serialize a value of type indexing_policy into a JSON string.

parameter len

specifies the initial length of the buffer used internally. Default: 1024.

val read_indexing_policy : Yojson.Safe.lexer_state -> Stdlib.Lexing.lexbuf -> indexing_policy

Input JSON data of type indexing_policy.

val indexing_policy_of_string : string -> indexing_policy

Deserialize JSON data of type indexing_policy.

val write_collection : Bi_outbuf.t -> collection -> unit

Output a JSON value of type collection.

val string_of_collection : ?⁠len:int -> collection -> string

Serialize a value of type collection into a JSON string.

parameter len

specifies the initial length of the buffer used internally. Default: 1024.

val read_collection : Yojson.Safe.lexer_state -> Stdlib.Lexing.lexbuf -> collection

Input JSON data of type collection.

val collection_of_string : string -> collection

Deserialize JSON data of type collection.

val write_list_collections : Bi_outbuf.t -> list_collections -> unit

Output a JSON value of type list_collections.

val string_of_list_collections : ?⁠len:int -> list_collections -> string

Serialize a value of type list_collections into a JSON string.

parameter len

specifies the initial length of the buffer used internally. Default: 1024.

val read_list_collections : Yojson.Safe.lexer_state -> Stdlib.Lexing.lexbuf -> list_collections

Input JSON data of type list_collections.

val list_collections_of_string : string -> list_collections

Deserialize JSON data of type list_collections.

val write_create_user : Bi_outbuf.t -> create_user -> unit

Output a JSON value of type create_user.

val string_of_create_user : ?⁠len:int -> create_user -> string

Serialize a value of type create_user into a JSON string.

parameter len

specifies the initial length of the buffer used internally. Default: 1024.

val read_create_user : Yojson.Safe.lexer_state -> Stdlib.Lexing.lexbuf -> create_user

Input JSON data of type create_user.

val create_user_of_string : string -> create_user

Deserialize JSON data of type create_user.

val write_create_partition_key : Bi_outbuf.t -> create_partition_key -> unit

Output a JSON value of type create_partition_key.

val string_of_create_partition_key : ?⁠len:int -> create_partition_key -> string

Serialize a value of type create_partition_key into a JSON string.

parameter len

specifies the initial length of the buffer used internally. Default: 1024.

val read_create_partition_key : Yojson.Safe.lexer_state -> Stdlib.Lexing.lexbuf -> create_partition_key

Input JSON data of type create_partition_key.

val create_partition_key_of_string : string -> create_partition_key

Deserialize JSON data of type create_partition_key.

val write_create_database : Bi_outbuf.t -> create_database -> unit

Output a JSON value of type create_database.

val string_of_create_database : ?⁠len:int -> create_database -> string

Serialize a value of type create_database into a JSON string.

parameter len

specifies the initial length of the buffer used internally. Default: 1024.

val read_create_database : Yojson.Safe.lexer_state -> Stdlib.Lexing.lexbuf -> create_database

Input JSON data of type create_database.

val create_database_of_string : string -> create_database

Deserialize JSON data of type create_database.

val write_create_collection : Bi_outbuf.t -> create_collection -> unit

Output a JSON value of type create_collection.

val string_of_create_collection : ?⁠len:int -> create_collection -> string

Serialize a value of type create_collection into a JSON string.

parameter len

specifies the initial length of the buffer used internally. Default: 1024.

val read_create_collection : Yojson.Safe.lexer_state -> Stdlib.Lexing.lexbuf -> create_collection

Input JSON data of type create_collection.

val create_collection_of_string : string -> create_collection

Deserialize JSON data of type create_collection.