+19
-1
.gitignore
+19
-1
.gitignore
···
+1
.ocamlformat
+1
.ocamlformat
···
···
+52
.tangled/workflows/build.yml
+52
.tangled/workflows/build.yml
···
···
+15
LICENSE.md
+15
LICENSE.md
···
···
+62
README.md
+62
README.md
···
···+Yamlt provides YAML streaming encode/decode that interprets Jsont.t type descriptions, allowing the same codec definitions to work for both JSON and YAML.
+5
dune
+5
dune
+10
-1
dune-project
+10
-1
dune-project
······
+469
-389
lib/yamlt.ml
+469
-389
lib/yamlt.ml
·····················-and decode_scalar : type a. decoder -> nest:int -> Event.spanned -> string -> Scalar_style.t -> a t -> a =-and decode_any_scalar : type a. decoder -> Event.spanned -> string -> Scalar_style.t -> a t -> a any_map -> a =-and decode_array : type a elt b. decoder -> nest:int -> Event.spanned -> (a, elt, b) array_map -> a =······-and decode_any_sequence : type a. decoder -> nest:int -> Event.spanned -> a t -> a any_map -> a =············-and decode_any_mapping : type a. decoder -> nest:int -> Event.spanned -> a t -> a any_map -> a =·····················
····························································
+149
-91
lib/yamlt.mli
+149
-91
lib/yamlt.mli
·········
·········
+4
-1
tests/bin/dune
+4
-1
tests/bin/dune
+13
-10
tests/bin/test_array_variants.ml
+13
-10
tests/bin/test_array_variants.ml
······
······
+74
-84
tests/bin/test_arrays.ml
+74
-84
tests/bin/test_arrays.ml
·········-Printf.sprintf "[%s]" (String.concat "; " (Array.to_list (Array.map (Printf.sprintf "%S") t.items)))······························
·······································
+52
-41
tests/bin/test_complex.ml
+52
-41
tests/bin/test_complex.ml
························
························
+48
-44
tests/bin/test_comprehensive.ml
+48
-44
tests/bin/test_comprehensive.ml
·········
·········
+32
-32
tests/bin/test_edge.ml
+32
-32
tests/bin/test_edge.ml
·····················-|> Jsont.Object.mem "empty_object_array" (Jsont.array (Jsont.null ())) ~enc:(fun d -> d.empty_object_array)···············
····································
+4
-2
tests/bin/test_flow_newline.ml
+4
-2
tests/bin/test_flow_newline.ml
···
···
+40
-52
tests/bin/test_formats.ml
+40
-52
tests/bin/test_formats.ml
·············································
·············································
+65
-61
tests/bin/test_locations.ml
+65
-61
tests/bin/test_locations.ml
························
························
+13
-9
tests/bin/test_null_complete.ml
+13
-9
tests/bin/test_null_complete.ml
···-| Ok v -> Printf.printf "Result: %s\n" (match v with None -> "None" | Some s -> "Some(" ^ s ^ ")")-| Ok v -> Printf.printf "Result: %s\n" (match v with None -> "None" | Some s -> "Some(" ^ s ^ ")")···
······
+17
-16
tests/bin/test_null_fix.ml
+17
-16
tests/bin/test_null_fix.ml
···
···
+54
-65
tests/bin/test_objects.ml
+54
-65
tests/bin/test_objects.ml
················································
················································
+6
-5
tests/bin/test_opt_array.ml
+6
-5
tests/bin/test_opt_array.ml
······
······
+134
-88
tests/bin/test_roundtrip.ml
+134
-88
tests/bin/test_roundtrip.ml
······-Jsont.Object.map ~kind:"Data" (fun required optional nullable -> { required; optional; nullable })···
·········
+80
-93
tests/bin/test_scalars.ml
+80
-93
tests/bin/test_scalars.ml
························
························
+17
-13
tests/bin/test_some_vs_option.ml
+17
-13
tests/bin/test_some_vs_option.ml
······
······
+5
yamlt.opam
+5
yamlt.opam
···