Hi Satya.
Thanks, but this functionality is already present in MyJSON. There are even JUnit tests thast test it.
Simply set the "strict" property of the serializer to true. For example:
public static void main(String[] args) {
User u = new User();
u.age = 23;
u.addr = new Address();
u.addr.street = "Sesame";
u.addr.zip = "28001";
u.name = "Cookie monster";.
Please attach a complete test, as with the information provided I cannot trace the error. I need the *full* serialized object, and the class definitions that you are trying to update.
I can't reproduce the error with the following test:
parser.setInput("{ mExpirationDate:{} }");
map = (ValueMap)parser.parse();
Assert.assertEquals(map.size(),1);
Assert.assertEquals(map.get("mExpirationDate"),new ValueMap());
It parses correctly and completes correctly. Can you submit the complete serialized string?
As for java.util.Date, its inner fields are marked as transient...