Questions tagged [xstream]

XStream is a simple Java library to serialize objects to XML and back again.

XStream

XStream is a simple library to serialize objects to XML and back again. It is typical used for Transport, Persistence, Configuration and Unit Tests.

Features

  • Ease of use. A high level facade is supplied that simplifies common use cases.

  • No mappings required. Most objects can be serialized without need for specifying mappings.

  • Performance. Speed and low memory footprint are a crucial part of the design, making it suitable for large object graphs or systems with high message throughput.

  • Clean XML. No information is duplicated that can be obtained via reflection. This results in XML that is easier to read for humans and more compact than native Java serialization.

  • Requires no modifications to objects. Serializes internal fields, including private and final. Supports non-public and inner classes. Classes are not required to have default constructor.

  • Full object graph support. Duplicate references encountered in the object-model will be maintained. Supports circular references.

  • Integrates with other XML APIs. By implementing an interface, XStream can serialize directly to/from any tree structure (not just XML).

  • Customizable conversion strategies. Strategies can be registered allowing customization of how particular types are represented as XML.

  • Error messages. When an exception occurs due to malformed XML, detailed diagnostics are provided to help isolate and fix the problem.

  • Alternative output format. The modular design allows other output formats. XStream ships currently with JSON support and morphing.

References

1024 questions
-2
votes
1 answer

XStream (JSON) HashMap Decode

I've got a class that contains a HashMap in it and am struggling to deserialize it back into my class. Here's what the class looks like... public class MyClass { public String message; public String …
Etep
  • 533
  • 7
  • 20
-2
votes
3 answers

How to convert XML to HashMap?

I hava a XML file containing Infos:
desertboat
  • 145
  • 1
  • 2
  • 9
-2
votes
1 answer

getting error in xslt transformation through java

I am trying to an xsl transformation that right now by a java object I am generating an intermediary XML and that XML is again passed to generate a new XML finally right now while in xsl transformation I am getting the error, let me show you below…
ndsfd ddsfd
  • 235
  • 1
  • 5
  • 13
-3
votes
1 answer

How do I convert an arraylist into xml file using Xstream

Okay so here's my constructor public class Highscore implements java.io.Serializable{ public String name; public double score; protected Highscore (String na, double sc){ name = na; score = sc; } public String…
1 2 3
68
69