How to convert json to xml?


  • 0
    H

    It have a json object, such as :
    "root" :{
    "Yylb": {
    "Yylb_id": [1,2]
    },
    "Fj": [
    {
    "Fjxx":1
    },
    {
    "Fjxx":2
    }
    ]
    }
    and now, how to convert a xml format like this:
    <root>
    <Yylb>
    <Yylb_id>1</Yylb_id>
    <Yylb_id>1</Yylb_id>
    </Yylb>
    <Fj>
    <Fjxx>1</Fjxx>
    </Fj>
    <Fj>
    <Fjxx>2</Fjxx>
    </Fj>
    </root>


Log in to reply
 

Looks like your connection to LeetCode Discuss was lost, please wait while we try to reconnect.