@Override
public Object doNotNullDemarshall(EJValue o, MarshallingSession ctx) {
if (o.isObject() != null) {
EJObject jsObject = o.isObject();
EJString string = jsObject.get(SerializationParts.ENCODED_TYPE).isString();
if (string == null) {
return MapMarshaller.INSTANCE.demarshall(o, ctx);
}
if (jsObject.containsKey(SerializationParts.NUMERIC_VALUE)) {
return NumbersUtils.getNumber(string.stringValue(), jsObject.get(SerializationParts.NUMERIC_VALUE));
}
Marshaller<Object> marshaller = ctx.getMarshallerInstance(string.stringValue());
if (marshaller == null) {
throw new RuntimeException("marshalled type is unknown to the marshalling framework: " + string.stringValue());
}
return marshaller.demarshall(o, ctx);
}
else if (o.isArray() != null) {