|
|
|
|
|
by Skinney
3247 days ago
|
|
json.loads('foo.json') (what is that? python?) requires that the json matches your types exactelly. This, at least for me, is rarely the case. And yes, it is. Here is code from my own project: Json.map3 HintTemplate
(Json.field "ID" Json.int)
(Json.field "Text" Json.string)
(Json.field "Image" Json.string)
Where HintTemplate is a record type containing an integer id, a string text and a image url. What about this is difficult? |
|