```{index} single: decode_json (JSON::XS) ``` ```{index} single: JSON::XS::decode_json ``` # decode_json UTF-8 encoded JSON text to Perl data. ## Synopsis ```perl use JSON::XS; my $data = decode_json '{"list":[1,true,null]}'; ``` ## What you get back The Perl structure: `JSON::XS->new->utf8->decode($bytes)`. Dies on text that is not valid JSON, and on characters above 255 (the text must be bytes).