serializer = new JSONSerializer();
try {
serializer.registerDefaultSerializers();
EnumSerializer enumSerializer = new EnumSerializer();
serializer.registerSerializer(enumSerializer);
serializer.registerSerializer(new BigIntegerSerializer());
} catch (Exception e) {
//throw new TransformationException(e);
}
serializer.setMarshallClassHints(true);
serializer.setMarshallNullAttributes(true);