Wiki source for CommandJson2xml
======Command json2xml======
====Name====
**json2xml** converts a JSON file to an xml file using the [[http://xml.calldei.com/JsonXML JXML schema]].
====Synopsis====
json2xml[ [[SerializationOptions serialization options]] ] [json file]
====Options====
Supports the standard [ [[SerializationOptions serialization options]] ]
====Examples====
Example
%%(shell)
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 successful
----
See [[CommandXml2json xml2json]]
[[Commands]]
[[CategoryCommands]]
====Name====
**json2xml** converts a JSON file to an xml file using the [[http://xml.calldei.com/JsonXML JXML schema]].
====Synopsis====
json2xml[ [[SerializationOptions serialization options]] ] [json file]
====Options====
Supports the standard [ [[SerializationOptions serialization options]] ]
====Examples====
Example
%%(shell)
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 successful
----
See [[CommandXml2json xml2json]]
[[Commands]]
[[CategoryCommands]]