# FieldCoderType

    public protocol FieldCoderType

Types that implement encoding to and decoding from `Data` to be used in `Field.Coded` properties’ `coder:` argument.

    class Person: CoreStoreObject {

        @Field.Coded("profile", coder: FieldCoders.Json.self)
        var profile: Profile = .init()
    }

- `FieldStoredValue`

  The type to encode to and decode from `Data`

  #### Declaration

  Swift

      associatedtype FieldStoredValue

- `encodeToStoredData(_:)`

  Encodes the value to `Data`

  #### Declaration

  Swift

      static func encodeToStoredData(_ fieldValue: FieldStoredValue?) -> Data?

- `decodeFromStoredData(_:)`

  Decodes the value from `Data`

  #### Declaration

  Swift

      static func decodeFromStoredData(_ data: Data?) -> FieldStoredValue?