How to model hierarchical json in Java
You implied Json -> Java object, but have you considered the other way around?  If so, check out Java object to Json serialization/deserialization using Gson.  Get more at https://en.wikipedia.org/wiki/Gson and https://static.javadoc.io/com.google.code.gson/gson/2.8.5/com/google/gson/Gson.html