JSON to XML



Drag/Copy Paste The JSON Text Here:




Insight:
This is a validator and reformatter for JSON and converts then to XML , a lightweight data-interchange format. Copy and paste, directly type, or input a URL in the editor above and let tidy and validate a JSON code.
JSON data types:
- String: Text string. The string must be entered into quotation marks (apostrophes are not allowed) and can contain all Unicode characters. Quotation marks and backslash must be entered in the form \" and \\. Any character (similar as in JavaScript) can be entered also in the form uXXXX, where XXXX represents the character code from Unicode table written in hexadecimal form. Example: "Temperature", "Name is \"PROMOTIC\"" - Number: Number, integer or real number (including the syntax with exponent). The decimal separator is always a period. Example: 1316, -1.23, 0.12e-4
- Boolean: Logical value. Example: true, false
- Null: Value null (not set). Example: null
- Array: Array (list of values). It is demarked by square brackets []. Array in JSON is a container with sequenced list of values. The values in array can be of any JSON data type including an object or an array. Example:
[12, "Beethoven", 33.6, false]
[0.2, ["Mozart", "Wolfgang, "Amadeus", 1756], "Salzburg", 35.8, false]
- Object: Object (name-value pairs). It is demarked by braces {}. Object in JSON is not an object in the sense we know from JavaScript. It is a container with data but no methods. Each data item (value) of the object has its key that is of the String type. Other objects and arrays can be inserted into such object thus creating more complex tructures. Example:
{"x": 100, "y": 100}
{"position": {"x": 100, "y": 100}, "size": {"dx": 200, "dy": 100}}
XML syntax refers to the rules that determine how an XML application can be written. The XML syntax is very straight forward, and this makes XML very easy to learn. Below are the main points to remember when creating XML documents.
Well-formedness The W3C specifies that all XML documents must be well-formed. Specifically, a textual object is a well-formed XML document if:
Taken as a whole, it matches the production labeled document It meets all the well-formedness constraints given the XML specification Each of the parsed entities which is referenced directly or indirectly within the document is well-formed If this all sounds confusing, don't worry too much. Basically, all you need to do is ensure you build your XML applications correctly!