serialize abstract method

Object serialize(
  1. Serializers serializers,
  2. T object, {
  3. FullType specifiedType = FullType.unspecified,
})

Serializes object.

Use serializers as needed for nested serialization. Information about the type being serialized is provided in specifiedType.

Returns a value that can be represented as a JSON primitive: a boolean, an integer, a double, a String or a List.

TODO(davidmorgan): document the wire format.

Implementation

Object serialize(Serializers serializers, T object,
    {FullType specifiedType = FullType.unspecified});