```{index} single: decode_prefix (JSON::XS) ``` ```{index} single: JSON::XS::decode_prefix ``` # decode_prefix Decode the JSON text at the start of a string. ## Synopsis ```perl my ($data, $chars) = JSON::XS->new->decode_prefix('[1,2] trailing text'); # ([1, 2], 5) ``` ## What you get back The Perl structure and the number of characters its text took; what follows is not looked at.