zio/zio-json

json 26 fields limitation

shmishleniy opened this issue · 0 comments

Hi, is there a workaround to generate an encoder/decoder for a case class with more than 26 fields?

Here is the error for the case class with 26 optional fields:
DeriveJsonDecoder[Qwe] [error] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ [error] | Maximal number of successive inlines (32) exceeded, [error] | Maybe this is caused by a recursive inline method? [error] | You can use -Xmax-inlines to change the limit.

tried setting -Xmax-inlines, but then it became a problem at the decoding stage in runtime because of this require

require(xs.length + aliases.length < 64)

Current 26 field limit makes it impossible to use with many data providers and forces to include an additional json library. Moreover that's limiting zio ecosystem for example quill jsonb processing