Revision [1690]
This is an old revision of CommandJson2xml made by DavidLee on 2011-02-03 05:59:13.
Command json2xml
Name
json2xml converts a JSON file to an xml file using the JXML schema.Synopsis
json2xml[ serialization options ] [json file]Options
Supports the standard [ serialization options ]
Examples
Example
echo ' { "foo" : [ true , null , 1.23 , { "bar" : "spam" } ] } ' | json2xml
Result
<OBJECT xmlns="http://www.xmlsh.org/jxml"> <MEMBER name="foo"> <ARRAY> <BOOLEAN>true</BOOLEAN> <NULL/> <NUMBER>1.23</NUMBER> <OBJECT> <MEMBER name="bar"> <STRING>spam</STRING> </MEMBER> </OBJECT> </ARRAY> </MEMBER> </OBJECT>
Return Value
Returns 0 if the conversion is successfulSee xml2json
Commands
CategoryCommands