RosettaCodeData/Task/JSON/Sidef/json.sidef
2023-07-01 13:44:08 -04:00

5 lines
178 B
Text

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