---
title: "Discussion on \"Using Jackson Subtypes to Write Better Code\" | Hashnode"
description: "Discussion on \"Using Jackson Subtypes to Write Better Code\". How to use subtypes and inheritance with Jackson to automatically convert JSON to the right subclass, resulting in better (and less) code."
url: "https://hashnode.com/posts/jackson-sub-types/64551250ce5e292ba1731aaa"
---

[Feed](https://hashnode.com/feed) /

Discussion

# [Using Jackson Subtypes to Write Better Code](https://stacktobasics.com/jackson-sub-types?utm_source=hashnode&utm_medium=feed)

How to use subtypes and inheritance with Jackson to automatically convert JSON to the right subclass, resulting in better (and less) code.

Apr 29, 2022 · 5 min read · stacktobasics.com  
Updated May 8, 2023  
Read the article

-   [#java](https://hashnode.com/tag/java)
-   [#jackson](https://hashnode.com/tag/jackson)
-   [#json](https://hashnode.com/tag/json)
-   [#rest-api](https://hashnode.com/tag/rest-api)

## Written by

[Shane Jennings](https://hashnode.com/@zinbo)

@zinbo · Nottingham, United Kingdom

  
[View profile](https://hashnode.com/@zinbo)

Full stack Developer - specialising in Java with Spring Boot and React with Next.js

Full Stack Developer and Architect. Specialising in Java with Spring Boot, and React with Next.js. Passionate about building cloud-native applications following DDD.

## Responses

Markdown supported · ⌘↵ to post

No responses yet.
