encode method

String encode(
  1. Object? o, {
  2. bool pretty = false,
  3. bool duplicatedEntitiesAsID = false,
  4. bool? autoResetEntityCache,
})

Transforms o to an encoded JSON.

  • If pretty is true generates a pretty JSON, with indentation and line break.

Implementation

String encode(Object? o,
    {bool pretty = false,
    bool duplicatedEntitiesAsID = false,
    bool? autoResetEntityCache}) {
  return encoder.encode(o,
      pretty: pretty,
      duplicatedEntitiesAsID: duplicatedEntitiesAsID,
      autoResetEntityCache: autoResetEntityCache);
}