Skip to content

Commit

Permalink
Remove validate_json (#137)
Browse files Browse the repository at this point in the history
It doesn't do much and made only sense in atdgen when we used to have a
`json` type. Now that the type doesn't exist it would require to be
renamed into `validate_t` but such functionality doesn't seem to make
sense to exist in Yojson, especially as it never does any validation to
begin with.
  • Loading branch information
Leonidas-from-XIV authored Mar 9, 2022
1 parent e2a85dc commit 7fbec1d
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 9 deletions.
2 changes: 2 additions & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@
- Removed `json_max` type (@Leonidas-from-XIV, #103)
- Removed constraint that the "root" value being rendered (via either
`pretty_print` or `to_string`) must be an object or array. (@cemerick, #121)
- Removed `validate_json` as it only made sense if the type was called `json`.
(@Leonidas-from-XIV, #137)

### Add

Expand Down
7 changes: 0 additions & 7 deletions lib/read.mli
Original file line number Diff line number Diff line change
Expand Up @@ -261,12 +261,5 @@ val read_json : lexer_state -> Lexing.lexbuf -> t
val skip_json : lexer_state -> Lexing.lexbuf -> unit
val buffer_json : lexer_state -> Lexing.lexbuf -> unit

val validate_json : 'path -> t -> 'error option
(* always returns [None].
Provided so that atdgen users can write:
type t <ocaml module="Yojson.Safe"> = abstract
*)

(* end undocumented section *)
(**/**)
2 changes: 0 additions & 2 deletions lib/read.mll
Original file line number Diff line number Diff line change
Expand Up @@ -1212,6 +1212,4 @@ and junk = parse
let compact ?std s =
to_string (from_string s)
let validate_json _path _value = None
}

0 comments on commit 7fbec1d

Please sign in to comment.