add amount
This commit is contained in:
parent
19a05f84e7
commit
d5eaf6d92f
4 changed files with 98 additions and 15 deletions
|
|
@ -4,8 +4,6 @@ let encode_exn jsont v = Jsont_bytesrw.encode_string jsont v |> Result.get_ok
|
|||
let encode jsont v = Jsont_bytesrw.encode_string jsont v
|
||||
let decode jsont v = Jsont_bytesrw.decode_string jsont v
|
||||
|
||||
(* JavaScript numbers restricted to integers. *)
|
||||
|
||||
module Error_detail = struct
|
||||
open Error_detail
|
||||
|
||||
|
|
@ -74,3 +72,6 @@ module Relative_time = struct
|
|||
|> Jsont.Object.mem "t_s" number_or_forever_jsont ~enc:Fun.id
|
||||
|> Jsont.Object.finish
|
||||
end
|
||||
|
||||
let amount_jsont =
|
||||
Jsont.of_of_string ~kind:"Amount" Amount.of_string ~enc:Amount.to_string
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue