JSON

Using JSON::Tiny

use JSON::Tiny;

say from-json '{ "foo": 1, "bar": [10, "apples"] }';
say to-json   %( blue => [1,2], ocean => "water" );

Output:

{bar => [10 apples], foo => 1}
{ "blue" : [ 1, 2 ], "ocean" : "water" }

Last updated