Commit 455f1bc540754c023475efc76ab6394c9f8968cd
1 parent
717cc766
add to_json_array function which transforms List(String) into JSON array of String
Showing
1 changed file
with
8 additions
and
0 deletions
Show diff stats
web/CXM_json.anubis
| @@ -110,6 +110,14 @@ public define JsonMember | @@ -110,6 +110,14 @@ public define JsonMember | ||
| 110 | ) = | 110 | ) = |
| 111 | json_member(name, json_null). | 111 | json_member(name, json_null). |
| 112 | 112 | ||
| 113 | +public define JsonValue | ||
| 114 | + to_json_array | ||
| 115 | + ( | ||
| 116 | + List(String) list_str | ||
| 117 | + )= | ||
| 118 | + json_array(map((String str) |-> json_string(str), list_str)) | ||
| 119 | +. | ||
| 120 | + | ||
| 113 | //------------------------------------------- | 121 | //------------------------------------------- |
| 114 | // Outputing Json to Printable_tree | 122 | // Outputing Json to Printable_tree |
| 115 | 123 |