diff options
| author | Adelyn Breelove <[email protected]> | 2019-01-11 12:44:22 -0700 |
|---|---|---|
| committer | Adelyn Breelove <[email protected]> | 2019-01-11 12:44:22 -0700 |
| commit | cba1fa3ab1b085600f3a73dae62682d21d112afb (patch) | |
| tree | 89ef10a59d8a355356561e564f23777b4a8f66bf /lib/models/snowflake.ml | |
| parent | Fix some deserializing bits (diff) | |
| download | disml-cba1fa3ab1b085600f3a73dae62682d21d112afb.tar.xz disml-cba1fa3ab1b085600f3a73dae62682d21d112afb.zip | |
More deserialization fixes
Diffstat (limited to 'lib/models/snowflake.ml')
| -rw-r--r-- | lib/models/snowflake.ml | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/models/snowflake.ml b/lib/models/snowflake.ml index 9e630e1..21846fc 100644 --- a/lib/models/snowflake.ml +++ b/lib/models/snowflake.ml @@ -2,10 +2,10 @@ open Core type t = int -let of_yojson_exn d = Yojson.Safe.Util.to_string d |> Int.of_string |> Ok +let of_yojson_exn d = Yojson.Safe.Util.to_string d |> Int.of_string let of_yojson d = - try of_yojson_exn d + try of_yojson_exn d |> Ok with Yojson.Safe.Util.Type_error (why,_) -> Error why let to_yojson s : Yojson.Safe.json = `String (Int.to_string s) |