Experimental JSON decoding API

  1. If I swap the order of email and name in my type alias , everything will continue to work correctly. This version is not at all coupled to the order in type alias because it does not use the type alias record constructor function.

The proposed experimental API doesn’t really fix this issue. Using a lambda to construct a literal record fixes the issue regardless of whether you’re using core decoders, pipeline decoders, or this experimental approach. In all three cases, users are likely to use the auto-generated constructors for large records.

2 Likes