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
- AlertEvidence
- ApiException
- ApiKey
- ApiKeySecret
- AttackSimulation
- AuditEvent
- AuthenticationException
- Batch
- BatchStats
- Branding
- ConflictException
- CountryStat
- DailyWorkspaceStat
- DashboardSummary
- ExportFile
- FakeReport
- FraudAlert
- FraudPolicy
- FraudSignalRecord
- GeoSummary
- IdempotencyRecord
- IdentityGenerationResult
- InspectorCacheEntry
- InspectorCatalog
- InspectorCatalogEntry
- Invitation
- InvitationCreated
- LiveEvent
- NotFoundException
- Notification
- NotificationPreference
- OfflineScanInput
- OfflineScanRecord
- OfflineScanVerdict
- OutcomeBreakdown
- Product
- ProductDeleteImpact
- ProductIdentity
- QueuedFakeReport
- RateLimitException
- RecallRecord
- RecallResult
- ReportAcknowledgement
- RevealedPin
- ServiceUnavailableException
- SimulationRequest
- SimulationStepRequest
- TrendPoint
- ValidationException
- VerificationException
- VerificationPresentation
- VerificationSession
- WebhookDelivery
- WebhookEndpoint
- WebhookEndpointSecret
- WebhookTestResult
- Workspace
- WorkspaceBootstrap
- WorkspaceMember
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