While there are many examples of Jackson serialization to JSON, there are comparatively few resources of Jackson serialization to CSV. Following is an example of working with a TSV-formatted dataset from the ground up, starting with creating the model object, building code samples for parsing CSV to Java objects using Jackson, writing Java objects to CSV using Jackson, and ending with code to a full round-trip test for serialization.
Continue reading “Jackson CSV Serialization and Deserialization from the Ground Up”Generating Java record classes with Jackson Annotations to map JSON using ChatGPT
There’s a lot of discussion about how to use ChatGPT to generate tests for code. Another interesting use case I’ve seen fairly little coverage of is generating DTOs from JSON. Here is an example with the prompt I’ve put together applied to JSON from the manifest of a Distributed Map Run.
Continue reading “Generating Java record classes with Jackson Annotations to map JSON using ChatGPT”