… | |
… | |
1612 | |
1612 | |
1613 | And after decoding the JSON text, you could walk the data |
1613 | And after decoding the JSON text, you could walk the data |
1614 | structure looking for arrays with a first element of |
1614 | structure looking for arrays with a first element of |
1615 | C<XU1peReLzT4ggEllLanBYq4G9VzliwKF>. |
1615 | C<XU1peReLzT4ggEllLanBYq4G9VzliwKF>. |
1616 | |
1616 | |
1617 | The same approach cna be used to create the tagged format with another |
1617 | The same approach can be used to create the tagged format with another |
1618 | encoder. First, you create an array with the magic string as first member, |
1618 | encoder. First, you create an array with the magic string as first member, |
1619 | the classname as second, and constructor arguments last, encode it as part |
1619 | the classname as second, and constructor arguments last, encode it as part |
1620 | of your JSON structure, and then: |
1620 | of your JSON structure, and then: |
1621 | |
1621 | |
1622 | $json =~ s/\[\s*"XU1peReLzT4ggEllLanBYq4G9VzliwKF"\s*,\s*("([^\\":,]+|\\.|::)*")\s*,/($1)[/g; |
1622 | $json =~ s/\[\s*"XU1peReLzT4ggEllLanBYq4G9VzliwKF"\s*,\s*("([^\\":,]+|\\.|::)*")\s*,/($1)[/g; |