If I have a JSON Schema that specifies a default value for a property, like
{
"type" : "object",
"properties" : {
"foo" : { "type" : "string" },
"bar" : { "type" : "string", "default" : "some text" }
}
}
...and a JSON string like
{
"foo" : "lorem ipsum"
}
...how can I deserialize that JSON string so that bar
is set to "some text" (the default value) instead of null?