Records to/from JSON

Alex Buckley alex.buckley at oracle.com
Thu May 7 21:35:07 UTC 2020


On 5/7/2020 1:27 PM, Brian Goetz wrote:
> There's a nice writeup of using records with Jackson here:
> 
> https://angiejones.tech/?p=5434

I cringed when I saw `@JsonProperty` annotations duplicating the record 
component names (shades of `@PathParam("id") String id;` from JAX-RS) 
but it seems like the Jackson team is on its way to not needing them.

A critical issue for the Jackson team seems to be detecting that a class 
is a record without using `Class::isRecord`, because it doesn't exist on 
Java 8. Multi-Release JARs, documented in JEP 238, would help Jackson here.

Alex


More information about the amber-dev mailing list