Add tasks for all the new languages

This commit is contained in:
Tina Müller 2016-12-05 23:44:36 +01:00
parent 9dc3c2bb62
commit bba7bfd280
13208 changed files with 134745 additions and 0 deletions

View file

@ -0,0 +1,35 @@
// Javascript objects are represented by maps in Lasso
local(mymap = map(
'success' = true,
'numeric' = 11,
'string' = 'Eleven'
))
json_serialize(#mymap) // {"numeric": 11,"string": "Eleven","success": true}
'<br />'
// Javascript arrays are represented by arrays
local(opendays = array(
'Monday',
'Tuesday'
))
local(closeddays = array(
'Wednesday',
'Thursday',
'Friday'
))
json_serialize(#opendays) // ["Monday", "Tuesday"]
'<br />'
json_serialize(#closeddays) // ["Wednesday", "Thursday", "Friday"]
'<br />'
#mymap -> insert('Open' = #opendays)
#mymap -> insert('Closed' = #closeddays)
local(myjson = json_serialize(#mymap))
#myjson // {"Closed": ["Wednesday", "Thursday", "Friday"],"numeric": 11,"Open": ["Monday", "Tuesday"],"string": "Eleven","success": true}
'<br />'
json_deserialize(#myjson) // map(Closed = array(Wednesday, Thursday, Friday), numeric = 11, Open = array(Monday, Tuesday), string = Eleven, success = true)