@@ -0,0 +1,31 @@
5+data JSONType : Type where
6+ JSONArray : Vect JSONType n -> JSONType
10+ JSONObject : SortedMap String JSONType -> JSONType
14+ using (ts : Vect JSONType n, fs : SortedMap String JSONType)
16+ data JArray : Vect JSONType n -> Type where
18+ (::) : JSON t -> JArray ts -> JArray (t :: ts)
21+ data JObject : SortedMap String JSONType -> Type where
23+ (::) : (f : (String, JSON t)) -> JObject fs -> JObject (insert (fst f) t fs)
25+ data JSON : JSONType -> Type where
26+ JSString : String -> JSON JSONString
27+ JSNumber : Float -> JSON JSONNumber
28+ JSBool : Bool -> JSON JSONBool
29+ JSNull : JSON JSONNull
30+ JSArray : JArray ts -> JSON (JSONArray ts)
31+ JSObject : JObject fs -> JSON (JSONObject fs)