RosettaCodeData/Task/JSON/Sidef/json.sidef
2023-12-16 21:33:55 -08:00

5 lines
173 B
Text

var json = require('JSON::PP').new
var data = json.decode('{"blue": [1, 2], "ocean": "water"}')
say data
data{:ocean} = Hash(water => %w[fishy salty])
say json.encode(data)