Quantcast
Channel: Perl XML::Twig send final output to JSON - Stack Overflow
Viewing all articles
Browse latest Browse all 3

Answer by mirod for Perl XML::Twig send final output to JSON

$
0
0
 my $output = $twig->print;

I think you want

 my $output = $twig->sprint;

there, so you get the string back instead of the twig object (thanks simbabque)

this will just output the variable as a JSON string though, not generate a data structure from the XML


Viewing all articles
Browse latest Browse all 3

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>