I use XML :: XML2JSON in Perl to convert JSON data to XML, I am viewing the following data (fragment):
{"question":{"isrequired":{"$t":"0"}}}
and when I use the XML function: XML2JSON-> json2xml to convert JSON data to XML, I get the following (snippet):
<isrequired/>
I need to save the "0" element in the "isrequired" tag, because from time to time I will have empty JSON elements and need an empty XML tag. I think the documentation is a bit vague (either this, or I don't understand), but is it possible to do this with this module?
I would be grateful for the help. Thank.
source
share