1 package com.freemindcafe.serialization.sample4;
3 import org.
apache.activemq.util.JettisonMappedXmlDriver;
6 import com.thoughtworks.xstream.io.xml.StaxDriver;
10 @
org.junit.Test(expected = NullPointerException.class)
11 public void hashmap_having_null_throws_null_pointer_exception() {
13 nikhil.randomMap.put(
"abc", null);
14 String xml =
new SerializationSvc(
"/com/freemindcafe/serialization/sample4/XMLAliasing.xml").toXML(nikhil);
15 System.out.println(xml);
19 public void hashmap_having_null_succeeds_by_handing_it_in_Sample4SerializeXStream() {
21 nikhil.randomMap.put(
"abc", null);
24 String xml = serializationSvc.toXML(nikhil);
25 System.out.println(xml);
Xstream and Jettison based serialization Jackson is arguably the standard Java Library for processing...