# Gson Deserialization and the InaccessibleObjectException

DevFeed: [Gson Deserialization and the InaccessibleObjectException](<https://devfeed.tech/articles/gson-deserialization-and-the-inaccessibleobjectexception-26583.md>)

Original publisher: [Read original article](<https://www.baeldung.com/java-gson-deserialization-inaccessibleobjectexception>)

Author: Marcin Buczkowski

Published: 2026-09-15T05:32:46Z

Content type: tutorial

Language: en

Sources: [Baeldung](<https://devfeed.tech/sources/baeldung.md>)

Topics: [Exception](<https://devfeed.tech/topics/exception.md>), [JSON](<https://devfeed.tech/topics/json.md>), [Tutorial](<https://devfeed.tech/topics/tutorial.md>), [Java](<https://devfeed.tech/topics/java.md>)

Tags: [exception](<https://devfeed.tech/tags/exception.md>), [gson](<https://devfeed.tech/tags/gson.md>), [how-to](<https://devfeed.tech/tags/how-to.md>), [java](<https://devfeed.tech/tags/java.md>), [json](<https://devfeed.tech/tags/json.md>), [json-gson](<https://devfeed.tech/tags/json-gson.md>), [tutorial](<https://devfeed.tech/tags/tutorial.md>)

## AI overview

This tutorial explains how Java's strong encapsulation and the Java Platform Module System can cause InaccessibleObjectException when Gson deserializes JSON through reflection. It focuses on modular projects, date handling, and Gson's maintenance status.

## Source excerpt

Learn how to resolve an InaccessibleObjectException when working with Gson and modern Java versions. The post Gson Deserialization and the InaccessibleObjectException first appeared on Baeldung.