Java Serialization to XML 
download > support > buy

uses
- features
- benefits
technology
accuracy

customers
case studies

pricing
about us
Accuracy
To demonstrate the accuracy of JSX, we compared it with Java's built-in serialization (JOS), for over 700 standard classes from Java 1.4.

JSX gave exactly the same results:
identical objects 741
differing objects 0
objects that could not be tested automatically 27
total Java classes in 1.4.1_02 that
could be compared with JOS
768

Test details
(1). We took all the classes that could be automatically tested from Java 1.4.
(2). We roundtripped their objects with JSX and Java serialization.
(3). We compared the resulting objects.
(4). JSX gave exactly the same objects.

- To roundtrip an object, we serialize it, then deserialize, to create a new object (a copy of the original).

- The comparison of objects is made in a separate phase. It must be a deep comparison for accuracy, meaning that it includes objects that are refered to. We did this by serializing both copies (from JSX and JOS) with JOS, and then directly comparing the results.

- JOS is Java Object Serialization, and is part of the Java language (eg. the Java keyword transient is for serialization). In Java 1.4, JOS is relied on by 2,297 classes.


Test limitations
- We assume the accuracy of both JOS and Java itself.

- The comparison with JOS is naturally restricted to objects that JOS can handle (including objects referred to), so we had to use classes that implement Serializable. There are 2,297 Serializable classes in Java 1.4. This limitation does not apply to JSX itself - it is only for the JOS comparison

- To automate the test, we used classes with a no-argument constructor, and so we test the object state that is created by the no-argument constructor. It is impossible to test all possible states automatically (eg. every possible value of each int in each object). For Java 1.4, this cuts down the Serialiable objects from 2,297 to 768 objects. This limitation does not apply to JSX itself - it is only for the JOS comparison

- Some classes could not be compared because they require more initialization than their no-argument constructor provides. For example, some CORBA objects require stubs and particular security access. These could not be compared in this test. These objects and explanations appear in this this list.

- The deep comparison works for classes whose serialized representation is always the same for the same object. This generally works, but there are exceptions, such as Maps and Sets. For these, a change in their element ordering is not significant, but it will change their serialized representation. A practical check for this problem is to serialize the same object twice with JOS, and see if they differ. Such objects cannot not be compared in this test. These objects and explanations appear in this this list. JSX handles Maps and Sets correctly - the limitiation is only for the JOS comparison