The ProtocolSerialization defines a toJsonForProtocol method which makes it possible to limit what fields are serialized when communicating over the protocol.
Implement this whenever protocol serialization must produce a different
result than SerializableModel.toJson — for example to strip serverOnly
fields, or to omit hidden persisted scope: none fields (such as implicit
relation FKs) that belong in the database but not on the wire. If
toJsonForProtocol would be identical to toJson, implementing this is not
required.
- Implementers
- AccessDeniedException
- CacheInfo
- CachesInfo
- CloudStorageDirectDownloadEntry
- CloudStorageDirectUploadEntry
- CloudStorageEntry
- ClusterInfo
- ClusterServerInfo
- CronFutureCallScheduling
- DatabaseMigrationVersion
- DistributedCacheEntry
- FileNotFoundException
- FutureCallClaimEntry
- FutureCallEntry
- FutureCallScheduling
- IntervalFutureCallScheduling
- LogEntry
- LogResult
- LogSettings
- LogSettingsOverride
- MessageLogEntry
- MethodInfo
- QueryLogEntry
- ReadWriteTestEntry
- RevokedAuthenticationAuthId
- RevokedAuthenticationScope
- RevokedAuthenticationUser
- RuntimeSettings
- ServerHealthConnectionInfo
- ServerHealthMetric
- ServerHealthResult
- ServerpodSqlException
- SessionLogEntry
- SessionLogFilter
- SessionLogInfo
- SessionLogResult
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toJsonForProtocol(
) → dynamic - Returns a JSON structure of the model, optimized for Protocol communication.
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited