Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8953063
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T14:00:58+00:00 2026-06-15T14:00:58+00:00

I have some Java code that is using flexjson.JSONDeserializer and flexjson.JSONSerializer. (simply speaking JSONDeserializer

  • 0

I have some Java code that is using flexjson.JSONDeserializer and flexjson.JSONSerializer. (simply speaking JSONDeserializer creates an class instance using property value pairs from a String of JSON and JSONSerializer takes a class instance and creates a String of JSON.)

And now I have a need to also use something similar for XML, what is the best match and is there something similar but that has better performance?

simple example

class X {
    private Integer a;
    public void setA(Integer a);
    public Integer getA(); 
}

with json equal to {"a":1} I have the following
new JSONDeserializer<X>().use(null, X.class).deserialize(json);

with json equal to [{"a":1},{"a":2}]
new JSONDeserializer<List<X>>().use(null, ArrayList.class).use("values", X.class).deserialize(json);
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-15T14:00:59+00:00Added an answer on June 15, 2026 at 2:00 pm

    Edit
    Comparision of XStream and JAXB here
    I still need to compare them again.
    End Edit

    XStream seems easier than the JAXB option since I am also dealing with collections of X

    code of serialization is simply

    return new XStream().toXML(collection);
    

    Maven dependences are

    <dependency>
        <groupId>com.thoughtworks.xstream</groupId>
        <artifactId>xstream</artifactId>
        <version>1.4.3</version>
    </dependency>
    <dependency>
        <groupId>xmlpull</groupId>
        <artifactId>xmlpull</artifactId>
        <version>1.1.3.1</version>
    </dependency>
    

    and in your java file add

    import com.thoughtworks.xstream.XStream;
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have some Java code that connects to an Oracle database using DriverManager.getConnection(). It
I have (java) code that creates and populates tables in a derby database, using
I have some Java code that validates XML against an XSD. I am using
I have some code that depends on jars that were compiled using Java 1.7.
I have some Java code that is throwing out of memory exceptions after running
I have a java code that looks like this: //UI thread //Some code Job
We have a system that has some Bash scripts running besides Java code. Since
I'm using Zend_Search_Lucene, the PHP port of Java Lucene. I currently have some code
I have inherited a bit of Java code that uses Hibernate. Some of the
I have some code that uses the Java Apache POI library to open a

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.