serializers top-level property

  1. @SerializersFor([AccountKitState, UserState, User, Organization, OrganizationState, AccessToken, AccessTokenState, App, Request, Services, GroupState, Group, OrganizationGroup, UserGroup, UserOrganization, VerificationCode, SessionRequest, Session])
Serializers serializers
final

Example of how to use built_value serialization.

Declare a top level Serializers field called serializers. Annotate it with SerializersFor and provide a const List of types you want to be serializable.

The built_value code generator will provide the implementation. It will contain serializers for all the types asked for explicitly plus all the types needed transitively via fields.

You usually only need to do this once per project.

Implementation

@SerializersFor([
  // ErrorState,
  AccountKitState,
  UserState,
  User,
  Organization,
  OrganizationState,
  AccessToken,
  AccessTokenState,
  App,
  Request,
  Services,
  GroupState,
  Group,
  OrganizationGroup,
  UserGroup,
  UserOrganization,
  VerificationCode,
  SessionRequest,
  Session,
])
final Serializers serializers =
    (_$serializers.toBuilder()..addPlugin(new StandardJsonPlugin())).build();