cliftonf has asked for the wisdom of the Perl Monks concerning the following question:
The JSON from XML::XML2JSON looks like this:$json = XML::XML2JSON->new(content_key => "Value",attribute_prefix => +"",pretty => 'true'); $jsondata = $json->convert($responsebody);
The JSON from the REST Console looks like this:{ "Titles" : { "xmlns" : "urn:eventis:traxisweb:1.0", "resultCount" : "7", "Title" : [ { "Contents" : { "resultCount" : "1", "Content" : { "DurationInSeconds" : { "Value" : "11280" },
Note the subtle differences in brackets and curly braces and spacing and the format of the duration value as well as the missing namespace value in the REST Console version. Is there a way I can make my perl script output JSON that matches the REST Console format ?{ "Titles": { "resultCount": 7, "Title": [{ "Contents": { "resultCount": 1, "Content": [{ "DurationInSeconds": 11280,
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: XML2JSON Question
by tangent (Parson) on Mar 15, 2014 at 01:47 UTC |