Decorator for complex-type properties to be (de)serialized correctly.
Use this if the property is of a non-array type that needs recursive (de)serialization.
// sub1 keeps the same name assert.isInstanceOf(deserialized.sub1, SubClass); assert.equal(deserialized.sub1.foo, 'bar');
// extSub2 became sub2 assert.isInstanceOf(deserialized.sub2, SubClass); assert.equal(deserialized.sub2.foo, 'baz');
constbackendObjectSerialized = mapper.serialize(deserialized); // reverse conversion was performed assert.deepEqual(backendObjectSerialized, backendObject);
Decorator for complex-type properties to be (de)serialized correctly. Use this if the property is of a non-array type that needs recursive (de)serialization.
Uses only the
name
property of the params.Usage examples: