Search
 
SCRIPT & CODE EXAMPLE
 

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)); 
    }
}
Comment

PREVIOUS NEXT
Code Example
Java :: positive numbers in array 
Java :: create a string in java 
Java :: can we have abstract class having no abstract method in java? 
Java :: import string java 
Java :: hashmap java 
Java :: encryption 
Java :: java.sql.SQLSyntaxErrorException: Unknown column 
Java :: Java Thread Example Using the Thread Class 
Java :: math.pow(x2-x1,2) 
Java :: spring login response data 
Java :: add items to linked list java 
Java :: how to return an object in java 
Java :: Find Length of String using length() 
Java :: android studio how to call api 
Java :: for loop in java 
Java :: run java class file 
Java :: array 2 
Java :: move gif in wave motion java 
Java :: Java program to swap two numbers using bitwise xor operator 
Java :: varstatus foreach jsp 
Java :: strictfp java example 
Java :: Deque interface in Java 
Java :: split email on dot java 
Java :: Java Catching base exception class only 
Java :: java arraylist max length 
Java :: what does .set do in java 
Java :: spring boot thymeleaf bindingresult 
Java :: java code to create square using 2D array 
Java :: jsp multipart/form-data submition 
Java :: System.Windows.Interactivity 
ADD CONTENT
Topic
Content
Source link
Name
3+5 =