toEncodableForProtocol static method

Object? toEncodableForProtocol(
  1. Object? object
)

Converts the provided object to a format suitable for protocol serialization. If the object is a ProtocolSerialization, it will be converted to JSON using the toJsonForProtocol method.

Implementation

static Object? toEncodableForProtocol(Object? object) =>
    _toEncodable(object, true);