With micro-channel applet json mutual conversion xml

1, first introduced the necessary js file in the directory structure

https://files.cnblogs.com/files/qianyou304/x2j.rar

2, js code portion follows :() json 2 xml

var X2JS = require('../../lib/x2js/we-x2js');
var loginJson = 
    {
        "Name": "LOGIN",
        "Info": {
          "userName": "test001",
          "password": "000000",
          "accessTime": "2019-09-12 15:19:40"
        }
    }           
var x2js = new X2JS();
var loginXml = x2js.js2xml(loginJson);

3, xml 2 json so you can

Guess you like

Origin www.cnblogs.com/qianyou304/p/11540691.html