Obj.Mems
Uniform members.
type 'a jsont := 'a t
val map :
?kind:string ->
?doc:string ->
'a jsont ->
dec_empty:(Context.t -> 'builder) ->
dec_add:(Context.t -> Meta.t -> string -> 'a -> 'builder -> 'builder) ->
dec_finish:(Context.t -> 'builder -> 'mems) ->
enc:('mems, 'a) enc ->
('mems, 'a, 'builder) map
map type' ~empty ~add ~fold
defines a structure of type 'mems
to hold unknown members with values of type 'a
. empty
is the empty collection, add
adds a member to the collection and fold
folds over it. See keep_unknown
.
val string_map :
?kind:string ->
?doc:string ->
'a jsont ->
('a Stdlib.Map.Make(Stdlib.String).t,
'a,
'a Stdlib.Map.Make(Stdlib.String).t)
map
string_map t
collects unknown member by name and types their values with t
. See keep_unknown
and see also as_string_map
.