Mercurial > meta
view json.urs @ 21:e7d64ea0f922
Variant.weaken, mp, and mapR
author | Adam Chlipala <adam@chlipala.net> |
---|---|
date | Thu, 05 Jan 2012 18:04:04 -0500 |
parents | 943410267fad |
children | 8de201d70b91 |
line wrap: on
line source
(** The JSON text-based serialization format *) class json val toJson : a ::: Type -> json a -> a -> string val fromJson : a ::: Type -> json a -> string -> a val mkJson : a ::: Type -> {ToJson : a -> string, FromJson : string -> a * string} -> json a val json_string : json string val json_int : json int val json_float : json float val json_bool : json bool val json_option : a ::: Type -> json a -> json (option a) val json_list : a ::: Type -> json a -> json (list a) val json_record : ts ::: {Type} -> folder ts -> $(map json ts) -> $(map (fn _ => string) ts) -> json $ts