Mercurial > meta
view json.urs @ 9:8eaaca74a64c
Import HTML parser
author | Adam Chlipala <adam@chlipala.net> |
---|---|
date | Wed, 15 Dec 2010 09:27:46 -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