Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
Test script
- Loading branch information
1 parent
8b514e4
commit 2c79322
Showing
1 changed file
with
31 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
module Json = struct | ||
type t = | ||
| Null | ||
| Array of t list | ||
| Object of (string * t) list | ||
| Float of float | ||
| Int of int | ||
| Bool of bool | ||
| String of string | ||
|
||
let to_string _ = "." | ||
|
||
exception Error of string | ||
end | ||
|
||
module A = struct | ||
module B = struct | ||
type json t = int | ||
let to_json = json_of_t | ||
let of_json = t_of_json | ||
end | ||
end | ||
|
||
type json t = { | ||
ab : A.B.t ; | ||
a : int ; | ||
?b : string option ; | ||
?c : int = (3+3) | ||
} | ||
|
||
|