]> gerrit.simantics Code Review - simantics/platform.git/blob - bundles/org.simantics.scl.data/scl/Data/Json.md
Fixed multiple issues causing dangling references to discarded queries
[simantics/platform.git] / bundles / org.simantics.scl.data / scl / Data / Json.md
1 # Basic functions
2
3 ::value[toJsonString, fromJsonString]
4
5 # Supported value types
6
7 This module supports the following value types:
8
9 ```
10 instance Json String
11 instance Json Short
12 instance Json Integer
13 instance Json Long
14 instance Json Float
15 instance Json Double
16
17 instance (Json a) => Json [a]
18 instance (Json a) => Json (Maybe a)
19
20 instance Json ()
21 instance (Json a, Json b) => Json (a, b)
22 instance (Json a, Json b, Json c) => Json (a, b, c)
23 instance (Json a, Json b, Json c, Json d) => Json (a, b, c, d)
24 instance (Json a, Json b, Json c, Json d, Json e) => Json (a, b, c, d, e) 
25
26 instance Json Json
27 ```
28
29 # Generic JSON Type
30
31 ::data[Json, JsonField]
32
33 # Adding support for additional value types
34
35 ::data[JsonGenerator, JsonParser]
36 ::class[Json]
37
38 It is enough to implement `toJson` and `fromJson`.
39
40 # Undocumented entities
41
42 ::undocumented[]