ManagedObject<T>s are read from HTTP request bodies and written to HTTP response bodies.
ManagedObject<T>can be converted to and from
Map<String, dynamic>objects. Each key is the name of a property in the object. To decode a
Map, call its
readmethod and its filters are inherited from
Serializableand are discussed in more detail here. Managed objects, like serializables, can be bound to operation method parameters.
Mapequivalent of a managed object are always primitive values that can be encoded as JSON, sent across an isolate, etc. The following shows a table of the serialization format:
asMapwill only be null if the property value truly is null:
read, or when returning objects from a query.
Serializeannotation allows a transient property to be included in this map.
asMapand setters will be input for
asMap()if its value is null.
id == 1would send the following JSON: