Create Codec[T] instance.
Create Codec[T] instance. T must have apply and unapply or unapplySeq implemented, and the argument type of apply and the return parameter of unapply must match. In other words, T is a case class.
If the above conditions are satisfied, there is a possibility that all codecs that are required internally will be built.v
If there is an implicit internal Codec, it will be used, otherwise it will be automatically generated from apply / unapply
- [ Note ] If recursive resolution is not possible and there are not enough user definitions to make up for it, a compilation error will occur.
For example, there is a trait field declaration inside, a class that does not have apply / unapply, or a type class that is not supported by default. In that case, you need to declare a custom Codec by the user.
Codec build type