On Wed, Feb 27, 2013 at 10:54 PM, Pankaj Shroff <[email protected]> wrote:
> That doesn't seem the case specially because if you define a record with a
> bunch of optional fields, then you would end up with an empty object (or
> rather an object with null values for its fields). Am I misunderstanding
> your question?
>
OK, I have probably misworded the question. Let's say I have a record
defining fields "a" and "b". For simplicity, their permissible values
are ints.
As I understand it:
{ "a": 1 }
is not legal since "b" is not provided.
This:
{ "a": 1, "b": 2, "c": 3 }
is not legal either since "c" is not defined.
BUT: { "a": 1 } can be legal IF a default value is provided for "b".
Am I getting this right, partially right, completely wrong?
--
Francis Galiegue, [email protected]
JSON Schema in Java: http://json-schema-validator.herokuapp.com