RosettaCodeData/Task/JSON/Sidef/json.sidef

6 lines
173 B
Plaintext

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)