XStream Overview - XStream

What are the features of XStream?

XStream is a simple Java-based library which is used to serialize Java objects to XML and vice versa.

Features

  • Easy to use - XStream API offers a high-level facade for simplifying the frequent use cases.
  • No need to create mapping - XStream API offers default mapping for most of the objects to be serialized.
  • Performance - XStream is fast with low memory footprint and this is suitable for large object graphs or systems.
  • Clean XML - XStream generates a clean and compact XML output which is easy to read.
  • Object modification not required - XStream serializes internal fields like private and final fields, and supports non-public and inner classes. Default constructor is not mandatory.
  • Full object graph support - XStream helps in maintaining duplicate references which are encountered in the object-model and it also supports circular references.
  • Customizable conversion strategies - Custom strategies are registered to allow customization of a particular type to be represented as XML.
  • Security framework - XStream offers a fair control over unmarshalled types for preventing security issues with manipulated input.
  • Error messages - When an exception occurs due to malformed XML, it will provide detailed diagnostics which helps in fixing the problem.
  • Alternative output format - XStream supports other output formats like JSON and morphing.

Common Uses

  • Transport
  • Persistence
  • Configuration
  • Unit Tests

All rights reserved © 2018 Wisdom IT Services India Pvt. Ltd DMCA.com Protection Status

XStream Topics