encodeWithType method

String encodeWithType(
  1. Object object
)

Encode the provided object to a json-formatted String, include class name so that it can be decoded even if th class is unknown.

Implementation

String encodeWithType(Object object) {
  return encode(wrapWithClassName(object));
}