Skip to content

Latest commit

 

History

History
42 lines (32 loc) · 1.36 KB

README.md

File metadata and controls

42 lines (32 loc) · 1.36 KB

Intro

I like xml. I like json. I like javascript. So I made a little tool to convert from json to xml.

Changelog

Last version is v0.1

  • v0.1 (demo here) : initial version

How to use

First, import the json2xml.js.
Then, do something like this :

var xml = json2xml.convert(obj, "data");

This will convert your json object (obj) to xml.

Parameters

The json2xml.convert function needs 2 parameters :

  • The json object (called "obj" in the example).
  • The xml root name ("data" in the example).

License

This plugin is licensed under the terms of the WTF Public License (see here and here) :

            DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE 
                    Version 2, December 2004 

 Copyright (C) 2004 Sam Hocevar  

 Everyone is permitted to copy and distribute verbatim or modified 
 copies of this license document, and changing it is allowed as long 
 as the name is changed. 

            DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE 
   TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION 

  0. You just DO WHAT THE FUCK YOU WANT TO. 

Contact

You can contact me at siegfried.ehretATgmail.com (replace AT with @) Please write "json2xml" or something in your subject.