view json.urs @ 2:478524b9d23a

Parsed a JSON record
author Adam Chlipala <adam@chlipala.net>
date Thu, 02 Dec 2010 11:59:55 -0500
parents 4d103b4450ee
children 8f7396495045
line wrap: on
line source
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_list : a ::: Type -> json a -> json (list a)

val json_record : ts ::: {Type} -> folder ts -> $(map json ts) -> $(map (fn _ => string) ts) -> json $ts