Skip to content

Commit 487d7d4

Browse files
committed
Upgrade github-unix to yojson 3.0.0
1 parent d70232b commit 487d7d4

File tree

2 files changed

+1
-21
lines changed

2 files changed

+1
-21
lines changed

gist/json.ml

Lines changed: 0 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -42,28 +42,7 @@ let rec format std (x : Yojson.t) =
4242
| `List l -> List (("[", ",", "]", array), List.map (format std) l)
4343
| `Assoc [] -> Atom ("{}", atom)
4444
| `Assoc l -> List (("{", ",", "}", record), List.map (format_field std) l)
45-
| `Tuple l ->
46-
if std then
47-
format std (`List l)
48-
else
49-
if l = [] then
50-
Atom ("()", atom)
51-
else
52-
List (("(", ",", ")", tuple), List.map (format std) l)
5345

54-
| `Variant (s, None) ->
55-
if std then
56-
format std (`String s)
57-
else
58-
Atom ("<" ^ json_string_of_string s ^ ">", atom)
59-
60-
| `Variant (s, Some x) ->
61-
if std then
62-
format std (`List [ `String s; x ])
63-
else
64-
let op = "<" ^ json_string_of_string s ^ ":" in
65-
List ((op, "", ">", variant), [format std x])
66-
6746
and format_field std (name, x) =
6847
(*let s = sprintf "%s:" (json_string_of_string name) in*)
6948
let s = json_string_of_ident name in

github-unix.opam

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ depends: [
2929
"cohttp-lwt-unix" {>= "4.0.0"}
3030
"stringext"
3131
"cmdliner" {>= "1.1.0"}
32+
"yojson" {>= "3.0.0"}
3233
"base-unix"
3334
"lwt"
3435
]

0 commit comments

Comments
 (0)