Hi Niklas,
Use the SerializationContext class to fine-tune the serialization.
Here an example I use in my projects.
@PostConstruct
public void configureSerializationContext() {
//ThreadLocal SerializationContent
SerializationContext serializationContext =
SerializationContext.getSerializationContext();
serializationContext.enableSmallMessages = true;
serializationContext.instantiateTypes = true;
//use _remoteClass field
serializationContext.supportRemoteClass = true;
//false Legacy Flex 1.5 behavior was to return a java.util.Collection
for Array
//true New Flex 2+ behavior is to return Object[] for AS3 Array
serializationContext.legacyCollection = false;
serializationContext.legacyMap = false;
//false Legacy flash.xml.XMLDocument Type
//true New E4X XML Type
serializationContext.legacyXMLDocument = false;
//determines whether the constructed Document is name-space aware
serializationContext.legacyXMLNamespaces = false;
serializationContext.legacyThrowable = false;
serializationContext.legacyBigNumbers = false;
serializationContext.restoreReferences = false;
serializationContext.logPropertyErrors = false;
serializationContext.ignorePropertyErrors = true;
}
And please note that in the latest 4.7.3 version we intentionally turned off
deserialization of XML content and deserialization of objects that are not
whitelisted.
See here for more details:
https://mail-archives.apache.org/mod_mbox/www-announce/201703.mbox/%[email protected]%3E
Chris
Am 03.10.17, 03:37 schrieb "Jack30t" <[email protected]>:
Hey,
I just switched from Adobe Flex BlazeDS to Apache Flex BlazeDS.
BlazeDS 4.0.0 serialized java.util.HashMap as Object and java.util.ArrayList
as Array while BlazeDS 4.7.3 serializes both as "Mixed Array". Is it somehow
possible to recieve first one's serialization with BlazeDS 4.7.3?
--
Sent from: http://apache-flex-development.2333347.n4.nabble.com/