Skip to content

Commit 1ea1e05

Browse files
committed
add back classify module
1 parent b8fd14b commit 1ea1e05

File tree

3 files changed

+16
-12
lines changed

3 files changed

+16
-12
lines changed

src/melange_json.ml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
type t = Js.Json.t
22
type json = t
33

4+
module Classify = Classify
5+
46
let to_json t = t
57
let of_json t = t
68

@@ -414,5 +416,3 @@ let parseOrRaise s =
414416
raise @@ ParseError message
415417

416418
external stringify : Js.Json.t -> string = "JSON.stringify"
417-
418-
let classify = Classify.classify

src/melange_json.mli

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -411,13 +411,15 @@ val parse : string -> json option [@@deprecated "Use `of_string` instead"]
411411
val parseOrRaise : string -> json [@@deprecated "Use `of_string` instead"]
412412
val stringify : json -> string [@@deprecated "Use `to_string` instead"]
413413

414-
val classify :
415-
json ->
416-
[ `Assoc of (string * json) list
417-
| `Bool of bool
418-
| `Float of float
419-
| `Int of int
420-
| `List of json list
421-
| `Null
422-
| `String of string ]
423-
(** Classify a JSON value into a variant type. *)
414+
module Classify : sig
415+
val classify :
416+
json ->
417+
[ `Assoc of (string * json) list
418+
| `Bool of bool
419+
| `Float of float
420+
| `Int of int
421+
| `List of json list
422+
| `Null
423+
| `String of string ]
424+
(** Classify a JSON value into a variant type. *)
425+
end

src/native/melange_json.ml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@ type t = Yojson.Basic.t
66
type json = t
77
(** Defined for convenience. *)
88

9+
module Classify = Classify
10+
911
let to_string t = Yojson.Basic.to_string t
1012

1113
include Errors

0 commit comments

Comments
 (0)