Command xml2json


Name

json2xml converts a JSON file to an xml file using the JXML schema.

Synopsis

xml2json[ serialization options [options] ] [xml file]


Options


-p,-printPretty Print the JSON output


Supports the standard [ serialization options ]

If no file is specified then stdin is read.




Examples


Example

Assuming an input file json.xml
<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>


xml2json -p json.xml


Result
 {
  "foo":
   [true,null,1.23,
	{
	 "bar":"spam"
	}]
 }



Return Value

Returns 0 if the conversion is successful

See json2xml
Commands
CategoryCommands

There are no comments on this page.
Valid XHTML :: Valid CSS: :: Powered by WikkaWiki