Dec 26, 2024
Hi Nilesh
In such cases, we need to use reflection (Java) to create the object. So, we can't use the constructor or builder directly.
To solve this, we introduce a public static method that takes JSON as an input and then returns the constructed object after deserialization. I'll cover this in detail in my next article.