(This post is meant to be a canonical question with a sample answer provided below.)
I\'m trying to deserialize some JSON content into a custom POJO type with
class Pojo { NestedPojo nestedPojo; }
in your json you have an array of nestedPojo so either you change the code
NestedPojo[] nestedPojo;
or you change the json string
String json = "{\"nestedPojo\":{\"name\":null, \"value\":42}}";