Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVA

Convert json to xml in java

import com.github.underscore.U;

public class MyClass {
    public static void main(String args[]) {
        String json = "{"Price": {"
        + "    "LineItems": {"
        + "        "LineItem": {"
        + "            "UnitOfMeasure": "EACH", "Quantity": 2, "ItemID": "ItemID""
        + "        }"
        + "    },"
        + "    "Currency": "USD","
        + "    "EnterpriseCode": "EnterpriseCode""
        + "}}";
        System.out.println(U.jsonToXml(json)); 
    }
}
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #Convert #json #xml #java
ADD COMMENT
Topic
Name
6+6 =