On 9/14/2010 1:50 PM, Gary Court wrote:
> 7. I would also like you to consider versioning the schema URIs as
> detailed in this post: http://groups.google.com/group/json-schema/browse_thread/thread/e34a52e4fe470920
Yes, I agree that that is a good idea.
> I haven't seen any activity from you (Kris) in the last two weeks,
> busy?
The message before this (last night) was from me ;).
--
Thanks,
Kris
--
Thanks,
Kris
On 9/17/2010 10:42 AM, Andy wrote:
> [snip]
> {
> . . .
> "properties": {
> "myaddress": {
> "description": "My own address ...",
> "extends": "http://some.org/json-schemas/address", # reference
> to a base schema
> "properties": {
> . . . # additional properties to the referenced schema (if
> allowed by it)
> }
> }
> }
> }
>
> I find it somewhat unusual to state that I extend a base schema, just
> because I want to provide a description of the property that is not
> even meant to be an additional description of the base type, but of
> its usage.
Currently schema referencing URLs are allowed in union types, and it
seems we could be more permissive and allow them as direct values for a
type as well, so you could write:
{
. . .
"properties": {
"myaddress": {
"description": "My own address ...",
"type": "http://some.org/json-schemas/address", # reference
to a base schema
}
}
}
However, I believe this would have have exactly the same behavior as
using "extends", it would just be a different spelling, which makes it
seem less compelling.
--
Thanks,
Kris
> Do you have a suggestion for a better name? It seems there are plenty
> of precedence for "id" to refer to one's own identity.
If I were to choose one, I would say "uri". But having thought about
this, I'd like to withdraw my proposal as json-ref's "self" link has
already behaved this way for some time.
-Gary
> --
> You received this message because you are subscribed to the Google Groups "JSON Schema" group.
> To post to this group, send email to json-...@googlegroups.com.
> To unsubscribe from this group, send email to json-schema...@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/json-schema?hl=en.
>
>
I believe what Andy is proposing is way to place restrictions on the
key of an object. This is something I would like to see as well.
Perhaps a "pattern" like attribute for any additional properties, say:
{
"type":"object",
"additionalProperties":{},
"namePattern":"\d+"
}
Where "namePattern" (lack of a better name) must match the key of each
additional property in order to validate.
Great points, that definitely makes sense for slash-delimited. But
aren't we just including dot-delimited because it already exists? If we
introduce dot-delimited starting with a dot, than there are three
formats, dot delimited, dot delimited starting with a dot, and slash
delimited (starting with a slash). That doesn't seem helpful.
I think I will update the spec to do the examples using slash-delimited
(starting with a slash) to encourage use of that format.
--
Thanks,
Kris
On 9/22/2010 11:21 PM, Gary Court wrote:
> Great to hear!
>
> To clarify about dot-delimited: what I'm saying is that dot-delimited
> seems currently broken. It makes sense to have sub referencing with
> fragment resolution start with a dot. I'll elaborate with an example:
>
> Assume we have a JSON document, with URI "doc". The root element of
> the document would have a URI of "doc#".
> In JavaScript, if I had a variable to this document, it might look
> like:
> var doc = {...};
> Thus, the JS variable "doc" is equivalent to the URI "doc#".
> If I wanted to access a property of the doc object, I would use (in
> JS):
> doc.subproperty
> Therefore, when referencing by URI, it would make sense to reference
> the subproperty with "doc#.subproperty".
I understand why dot-delimited is broken, but if we agree that
slash-delimited is superior, why aren't we just pointing people to
slash-delimited? What is the point of creating another version of
dot-delimited, if we don't want them to use it anyway? The only reason
that dot-delimited is included in the spec is because (I think) it is
currently being used. If it is there just to acknowledge existing
practice, is pointless to change the behavior of dot-delimited to
something that no longer matches reality. We would need to create a
third resolution strategy which doesn't seem helpful.
--
Thanks,
Kris
-Gary
On 9/23/2010 1:24 PM, Gary Court wrote:
> We *should* be pointing people to slash-delimited, I'm not refuting
> that. I'm just saying that while we are in this section, why not fix
> dot-delimited as well? Or, have the specification (under
> dot-delimitation only) state that both forms should be acceptable, so
> as not to break backwards compatibility.
That sounds fine, we can do that.
--
Thanks,
Kris
On 9/26/2010 2:12 PM, Greg Olszewski wrote:
> Hi Kris,
>
> Thanks for taking the time to prepare another version! It looks good,
> but I have a few concerns.
>
> First a nit. The hyper-schema isn't valid JSON. There's an illegal
> trailing comma in this bit:
>
>
> "requires" : {
>
> "type" : ["string", "http://json-schema.org/hyper-schema-or-uri"],
>
> },
>
>
> A larger concern for me are the changes to the semantics of "minimum"
> and "maximum" as well as the change that properties are now optional
> unless stated (in version two they were required unless stated).
It seems like if we expect JSON Schema to continue to grow in usage that
it would be better to correct and improve the design now rather than
waiting until later or leaving it with a sub-optimal design.
> I
> don't understand the reasoning for the changes, so this seems less
> than ideal, but, as long as the schema uri includes a version, it's
> workable.
>
> If you expect further changes of this kind, consider adding either a
> "version" key, or making "extends" a required attribute, so that the
> various formats can be distinguished reliably.
Does this provide a significant reliability advantage over versioned
schema URIs? I'd prefer to not have to introduce another property if
versioning can be handled by existing mechanisms.
--
Thanks,
Kris
On 10/4/2010 1:21 PM, Gary Court wrote:
> I can only speak for myself, but my feeling on the specification is
> that we are getting close, but there are a couple outstanding issues
> left to discuss. And the bigger job of getting the spec and schema/
> examples flushed out and reviewed for correctness. If I were to take a
> guess, I'd say this could likely be accomplished within a month.
What do you see as the key outstanding issues?
I think that it may be worth considering the "release early, release
often" iterative approach, and try to submit a version 3 soon and defer
more review and corrections to draft 4. I think version 3 is better than
version 2 at this point. The biggest concern about releasing a version 3
prematurely would be introducing any new problems by our changes. There
may be some valid concerns with verifying the new changes in version 3,
which may indeed need some more review. Just wanted to make sure we know
what needs to get done.
--
Thanks,
Kris
On 10/4/2010 8:35 PM, Greg Olszewski wrote:
> Hi,
>
>>> If you expect further changes of this kind, consider adding either a
>>> "version" key, or making "extends" a required attribute, so that the
>>> various formats can be distinguished reliably.
>> Does this provide a significant reliability advantage over versioned
>> schema URIs? I'd prefer to not have to introduce another property if
>> versioning can be handled by existing mechanisms.
>>
> Versioned schema URIs solve half of the problem that's concerning me.
> They provide a mechanism to distinguish different versions of the
> json-schema definition. They don't, by themselves, offer a
> mechanism to recognize what version of the json-schema definition
> a particular schema adheres to.
>
> I see that there's a mechanism to reference these versioned URIs when
> json-schema is used in a protocol which provides media type definitions.
> Outside of that context, I don't see a mechanism to reference the URIs
> defined.
>
> Identification could be more reliable if a mechanism to reference the URIs
> existed within the schema itself. It would be more reliable if the draft
> RFC said that when json-schema is used outside of a protocol providing
> media type definitions, this mechanism SHOULD be used.
>
> Identification is reliable if json-schema has a mechanism to reference
> the versioned schema schema URIs, and the draft RFC says it MUST
> be used when an external mechanism isn't.
>
> I'm not certain whether the reliability that offering a mechanism would
> provide is a significant advantage. It certainly would allow less work in
> some cases. Whether that is a significant advantage likely depends
> on how often incompatible changes are made to the definition.
Would it help to disambiguate versions if we had an empty "base" schema
for each version of the spec? So you could do:
{
"name":"some schema",
"extends":"http://json-schema.org/v3/base",
"properties":{
...
The base would also be an empty schema (doesn't add any constraints),
but validators could use it as an indication of the schema version.
Or we could reintroduce the "$schema" attribute (maybe without the $),
as way to refer to the meta-schema (that indicates the schema version).
--
Thanks,
Kris
On 05/10/10 06:47, Gary Court wrote:
> I'd like to see "$schema" be used as draft 2 already defines this
> link. In fact, JSV already uses this for switching between schemas to
> validate with.
>
>
I've thought that should be the case - i.e. data presented could include
a $schema including $schema properties on embedded objects but I've not
been able to make it work. Could you give an example?
{
"$schema":"http://base.com/s1",
"data":[
{
"$schema":"http://base.com/one-sort",
"one-sort-data":vvv ...
},
{
"$schema":"http://base.com/another-sort",
"another-sort-data":vvv ...
}
]
}
Could I register with JSV schemas s1, one-sort, another-sort and then
JSV.validate this data?
What would the s1 schema look like, would it have to refer to one-sort
and another-sort or could $schema handle that when "data":{"type":"array"}?
Chris
>> If you expect further changes of this kind, consider adding either a
>> "version" key, or making "extends" a required attribute, so that the
>> various formats can be distinguished reliably.
>
> Does this provide a significant reliability advantage over versioned
> schema URIs? I'd prefer to not have to introduce another property if
> versioning can be handled by existing mechanisms.
>
Versioned schema URIs solve half of the problem that's concerning me.
They provide a mechanism to distinguish different versions of the
json-schema definition. They don't, by themselves, offer a
mechanism to recognize what version of the json-schema definition
a particular schema adheres to.
I see that there's a mechanism to reference these versioned URIs when
json-schema is used in a protocol which provides media type definitions.
Outside of that context, I don't see a mechanism to reference the URIs
defined.
Identification could be more reliable if a mechanism to reference the URIs
existed within the schema itself. It would be more reliable if the draft
RFC said that when json-schema is used outside of a protocol providing
media type definitions, this mechanism SHOULD be used.
Identification is reliable if json-schema has a mechanism to reference
the versioned schema schema URIs, and the draft RFC says it MUST
be used when an external mechanism isn't.
I'm not certain whether the reliability that offering a mechanism would
provide is a significant advantage. It certainly would allow less work in
some cases. Whether that is a significant advantage likely depends
on how often incompatible changes are made to the definition.
Hoping this makes things clearer,
Greg
I can see that I can refer from one schema to another using
{"$ref":"another-schema"} but when I register the other schema to JSV I
don't think JSV is reading the $schema. At present I'm doing my own
registration to make things work. Should I not be able to register:
{
"$schema":"http://json-schema.org/hyper-schema#",
"id":"http://somewhere.com/another-schema#",
"type":"object",
etc
}
by passing it to JSV.registerSchema, i.e. could not registerSchema work
out what the URI is for the supplied schema?
Sounds good. A pointer in the RFC to that part of the hyper-schema would have
helped me find this on my own.
Greg
Replying again, pardon please.
I made orderly output "$schema" properties. Here's an example:
http://trap.mtview.ca.us/~noop/with_dollar_schema.txt
Did I do this in a way such that JSV will recognize that's the schema
is adhereing to RFC draft 2 ?
Thanks,
Greg
On 10/4/2010 5:24 PM, Gary Court wrote:
> The issues I have on my list are:
>
> 1. A new attribute that allows restrictions to be placed on property
> names of objects
> 2. Abandoning schemas-can-be-uris VS changing "requires" to two
> attributes
Just to give a defense of my position on this... My hope with JSON
Schema is that it would be as easy as possible for authors in the most
common cases (and that more sophisticated cases be possible). From what
I have seen with schema usage, linking schemas is used far more than the
multiple forms of "requires". Consequently, I think it is much higher
priority that linking be as simple as possible, and removing the need to
embed target URLs in {"$ref":"..."} obviously simplifies the structure
of schemas that are doing linking. If the consequence of this highly
used feature means splitting "requires" into two attributes (or removing
one of the forms), which is arguably not even more complicated (having
two different forms in a single attribute might actually be more
confusing than having distinct attributes for some people) seems well
worth it.
Using the URIs as links fits much better with the hyper-schema driven
approach as well. JSON referencing was developed as a format to achieve
linking, but is really anachronistic next to the more flexible and
succinct linking available with hyper-schemas. While we have made a way
for JSON referencing to be described with hyper-schemas, it is
definitely not the most elegant use of a hyper schema.
--
Thanks,
Kris
A. Up until this point, there has been no understanding of URIs or
links in the core schema. All linking and resolving of URI has been
left to definitions in the Hyper Schema. A simple validator that only
validated with the core JSON Schema has never had to keep track of
what instance had what URI, and never had to do a lookup to resolve a
link/reference. By moving referencing into the core JSON Schema, now
simple validators MUST keep track of the URI of instances, and do URI
resolving. This now complicates simple validators, and also starts to
blur the lines between core and hyper.
B. The other aspect is that a schema can be either and object of
attributes or a string of a reference: Objects are must easier to
classify then strings are. The context of an object can be determined
by its properties, and the content of those properties. A string,
however, is much harder to determine it's context programatically as
URIs can look very similar to any other random string.
So... what I am getting at with this is that if a reference is an
object (like {$ref}), it's much easier for a validator to recognize
that compared to any other object; unlike a string which could be a
URI, could be something else that looks like a URI. This comes into
play with attribute type collisions (for example, "type" or
"requires"), when a string now has multiple meanings.
C. Finally, my thoughts on "requires": I'd actually like to see this
attribute removed and replaced with something that is more referencing
friendly. What I mean (and I've stated this in other threads) is that
"requires" is the only attribute that applies restrictions to the
parent/containing instance of the instance. When another schema tries
to reference a schema that has this attribute, it then applies that
restriction to itself (the parent schema/instance) which is probably
not the behavior intended by the referenced schema's author. I believe
that JSON Schema should avoid applying restrictions to parent
instances as much as enforcing that the default value is false. My
solution to this would be to move the "requires" attribute behavior
into the parent schema. This would also eliminate the need to have
this attribute accept a schema. This is how I would envision this
attribute to look like:
{
"properties" : {
"city" : {},
"state" : {},
"country" : {}
},
"dependencies" : {
"city" : ["state", "country"],
"state" : "country"
}
}
Anyways, let me know what your thoughts are on my above thoughts. Thanks!
-Gary
On 10/12/2010 12:11 PM, Gary Court wrote:
> I understand your reasoning, and that is a fair assessment. I too
> recognize that referencing other schemas is quite common when writing
> schemas. Here are my thoughts on the situation:
>
> A. Up until this point, there has been no understanding of URIs or
> links in the core schema. All linking and resolving of URI has been
> left to definitions in the Hyper Schema. A simple validator that only
> validated with the core JSON Schema has never had to keep track of
> what instance had what URI, and never had to do a lookup to resolve a
> link/reference. By moving referencing into the core JSON Schema, now
> simple validators MUST keep track of the URI of instances, and do URI
> resolving. This now complicates simple validators, and also starts to
> blur the lines between core and hyper.
>
If we considered JSON referencing to be applicable to core schemas (as
the core meta-schema suggests), than a referencing aware schema
validator has always had to do reference resolution.
However, it is desirable to separate this out from the core schema, and
to the degree that we can at least separate the core schema definition
from the resolution semantics of hyper schema, we should be able to do
the same with schemas as strings. We could word the spec such that hyper
schema is defined as allowing a string-URL as an alternate to an object
(rather than stating this in each property), thereby making that all
core schema properties that accept schemas, also accept strings in the
context of hyper schema.
> B. The other aspect is that a schema can be either and object of
> attributes or a string of a reference: Objects are must easier to
> classify then strings are. The context of an object can be determined
> by its properties, and the content of those properties. A string,
> however, is much harder to determine it's context programatically as
> URIs can look very similar to any other random string.
> So... what I am getting at with this is that if a reference is an
> object (like {$ref}), it's much easier for a validator to recognize
> that compared to any other object; unlike a string which could be a
> URI, could be something else that looks like a URI. This comes into
> play with attribute type collisions (for example, "type" or
> "requires"), when a string now has multiple meanings.
I do acknowledge that these semantics demand a more involved bootstrap
process (although presumably all the tools that are needed for the
bootstrapping should be available if the implementation supports hyper
schemas). But of course again I appeal to the expectation that there
should be vastly more schema authors than validator authors, and this
design is clearly biased towards the schema authors.
> C. Finally, my thoughts on "requires": I'd actually like to see this
> attribute removed and replaced with something that is more referencing
> friendly. What I mean (and I've stated this in other threads) is that
> "requires" is the only attribute that applies restrictions to the
> parent/containing instance of the instance. When another schema tries
> to reference a schema that has this attribute, it then applies that
> restriction to itself (the parent schema/instance) which is probably
> not the behavior intended by the referenced schema's author. I believe
> that JSON Schema should avoid applying restrictions to parent
> instances as much as enforcing that the default value is false. My
> solution to this would be to move the "requires" attribute behavior
> into the parent schema. This would also eliminate the need to have
> this attribute accept a schema. This is how I would envision this
> attribute to look like:
>
> {
> "properties" : {
> "city" : {},
> "state" : {},
> "country" : {}
> },
> "dependencies" : {
> "city" : ["state", "country"],
> "state" : "country"
> }
> }
That sounds like a good improvement to me. However, how does this
eliminate the need for referencing schemas? Would property values still
accept schemas (like if you wanted to say that the presence of a
"state" property required that the country be "US" or "Canada")?
--
Thanks,
Kris
It's true that you can't bootstrap the core schema without hyper
schema. But in most implementations the references can be added in via
language and validator specific means.
I started looking at this issue another way and I've changed my mind
about point A: what if we have simple validators as validators that
implement the core schema and full validators also implement hyper
schema. Then, referencing schemas should be apart of the core schema
as it's a feature that is used quite commonly (as you've stated). I
can get behind that.
So then, the argument about this subject is less about "should it be
in the next spec", but rather "what format referencing should take". I
pose this question: Is {"$ref" : "someURI"} that much harder to write
then "someURI"? In my opinion, the former is easier for a person to
read and understand that it is a reference. From a validator
standpoint, the process of transforming either format to a schema is
relatively the same amount of processing (assuming the validator is
using a simple link resolution).
Also, by moving to a string only format, we potentially limit the
ability to specify additional metadata with our reference. With an
object you can always add additional properties. Meaning, we still
need to support referencing with links (via hyper-schema); which now
means we have two ways of referencing other schemas. And I don't think
we should be duplicating functionality.
> That sounds like a good improvement to me. However, how does this
> eliminate the need for referencing schemas? Would property values still
> accept schemas (like if you wanted to say that the presence of a
> "state" property required that the country be "US" or "Canada")?
This can still be accomplished with union types:
{
"type" : [
{
"properties" : {
"state" : {},
"country" : { "enum" : ["US", "Canada"] }
},
"dependencies" : {
"state" : "country"
}
},
{
"properties" : {
"state" : { "disallow" : "any" }
}
}
]
}
This does make it more lengthy, but avoids us from having string type
collisions with property name and schema URI....
Actually, I just realized that if you had multiple relationships, your
union types would grow exponentially. That would be bad.
Perhaps this new attribute should only accept schemas? Or maybe simply
naming properties must be wrapped in an array.
A schema dependency example would then look like:
{
"properties" : {
"state" : {},
"country" : {}
},
"dependencies" : {
"state" : {
"properties" : {
"country" : { "enum" : ["US", "Canada"], "required" : true }
}
}
}
}
While a simple dependency would look like:
{
"properties" : {
"state" : {},
"country" : {}
},
"dependencies" : {
"state" : ["country"]
}
}
FYI, Canada has provinces, not states :-) But I understand for the
sake of example.
What I am referring to is that if we implement schemas-can-be-uris,
there are then two ways of referencing a schema:
"uri://to/schema"
...and...
{"$ref" : "uri://to/schema"}
And if a validator only implemented the core schema specification, it
would only accept the first method. Meaning schemas written using the
second method would be unusable in that validator. If the only way to
reference was the second method, then it doesn't matter if the
validator supported hyper-schema or not for referencing to work.
Although it is extra characters, the second method is forward
compatible with Hyper schema, backwards compatible with older drafts,
doesn't type collide with other property values, and is easier to
visually identify from other strings that it is a reference.
-Gary
Obviously I agree that we should only have one method of referencing.
Are you proposing that we remove "full" links from hyper-schema in
favor of schemas-can-be-uri referencing?
>>
>> Although it is extra characters, the second method is forward
>> compatible with Hyper schema, backwards compatible with older drafts,
>> doesn't type collide with other property values, and is easier to
>> visually identify from other strings that it is a reference.
>
> It is not difficult for schema validators to maintain backwards
> compatibility with schemas from older drafts. In terms of readability,
> the extra characters may help if all you are doing is looking for
> references, but it terms of overall readability, the direct URLs are
> seems far cleaner and more readable to me.
I just think we should use objects for referencing to prevent type
collisions, and to keep referencing consistent across the various
drafts.
-Gary
JSON Schema is for validating JSON only. Validating datatypes that are
outside of the JSON specification are beyond the goals of this
specification.
> 2) I18n
> Make it possible to define text ("title", "description") both as
> strings and as objects, where the names define the language tag and
> the strings are a localized version.
This is an interesting topic as we've mostly avoided i18n talk in the
specification. I think we should create a new thread on this topic.
Technically it's currently possible to do i18n in JSON Schema by using
an after-process translate lookup of the value of
"title"/"description" attributes.
> 3) "type"
> I don't understand that I can use several schemas (in addition to the
> strings). "type" is already a property of a schema, so why should
> point type itself to a schema?
> To allow several schemas, it would be much clearer to use an array of
> schemas as schema, like:
>
> ...
> properties: {
>
> a: [{
> // schema 1
> }, {
> // schema 2
> }]
> }
> ...
>
> Isn't this more consequent?
If we were to implement union types in this manner, then JSON Schema's
could be objects, arrays, or strings. This would cause further type
collisions with other attribute values (like "items").
> 4) "uniqueItems": Why shouldn't complex values be compared?
My guess is that this was originally defined this way because in
JavaScript {} !== {}, or [] !== []. And is very computationally
expensive to deep compare objects/arrays. However, there really isn't
any technical reason with this should be in there, and could be
removed.
> 5) "maxDecimal" - Make clear that this can be negative as well.
Actually, this attribute should be replaced as it unfairly assumes the
number is in base 10.
> 6) "id" - Define a pattern that excludes "." and "#" (and other
> characters?)
Yes, the "id" attribute should be defined in the core schema JSON, but
with a "format" of "uri" rather then a pattern.
> 7) Why is "default" only used in hyper schema? I usually need it in
> any case.
I too have been wondering why this was moved. Perhaps Kris can explain
this decision.
-Gary
On 11/3/2010 5:14 AM, Andi wrote:
>
> On 3 Nov., 00:03, Gary Court <gary.co...@gmail.com> wrote:
>> On Tue, Nov 2, 2010 at 2:59 PM, Andi <andreaskal...@gmx.de> wrote:
>>> My review is based onhttp://github.com/kriszyp/json-schema
>>> 1) To make it clear: Is it really only for JSON data? I mainly
>>> validate data that is already inside my JS engine, and validators are
>>> implemented in other languages. I am not going to validate JSON
>>> (strings) but data that is directly available.
>>> My data can be incompatible with JSON because of
>>> a) referencing (not explicit by refs but inside my language
>>> implementation)
>>> b) ambiguous mappings between JSON's and other languages' data types.
>> JSON Schema is for validating JSON only. Validating datatypes that are
>> outside of the JSON specification are beyond the goals of this
>> specification.
> OK, on the other hand we must not ignore implementations in other
> languages in terms of establish JSON Schema's vocabulary as a
> standard. Is there a list of all known implementations?
There was one on the google groups site, but I realize that they plan to
take that down, so I put up an updated list here:
http://www.json-schema.org/implementations.html
>>> 2) I18n
>>> Make it possible to define text ("title", "description") both as
>>> strings and as objects, where the names define the language tag and
>>> the strings are a localized version.
>> This is an interesting topic as we've mostly avoided i18n talk in the
>> specification. I think we should create a new thread on this topic.
>>
>> Technically it's currently possible to do i18n in JSON Schema by using
>> an after-process translate lookup of the value of
>> "title"/"description" attributes.
> Of course, you can save localized versions elsewhere, but it's a good
> case for having it in one place.
i18n/locationalization is applicable to any JSON data, so solutions
shouldn't be specific to JSON Schema. HTTP/REST has great mechanisms for
i18n, that's my preferred approach to switch to different locales. On
the otherhand, if there are i18n schemes that can be described by JSON
Schema, that might be interesting. Do you have such a proposal?
I don't care whether it is divisibleBy or maxDecimal. There were some
that wanted to go back to maxDecimal. Maybe we need to vote on some of
these things.
>>> 6) "id" - Define a pattern that excludes "." and "#" (and other
>>> characters?)
>> Yes, the "id" attribute should be defined in the core schema JSON, but
>> with a "format" of "uri" rather then a pattern.
> Is a simple id (like "mySchema") a URI?
Yes, that is a perfectly valid relative URI.
>>> 7) Why is "default" only used in hyper schema? I usually need it in
>>> any case.
>> I too have been wondering why this was moved. Perhaps Kris can explain
>> this decision.
> I use default to set a value, if it is required but not given in the
> instance. It's really useful.
It was proposed that the core schema should just consist of attributes
that are used for validation. The "default" attribute is does affect
validation, but rather informs agents how to setup new instances.
--
Thanks,
Kris
On Tue, Nov 2, 2010 at 9:59 PM, Andi <andrea...@gmx.de> wrote:
> 4) "uniqueItems": Why shouldn't complex values be compared?
Agreed on this question. It's trivial to implement this kind of
comparison in Python
(where objects are Python dicts and arrays are Python lists).
> 5) "maxDecimal" - Make clear that this can be negative as well.
I asked in my own feedback what the description even means, and I'm
still not sure. Perhaps some examples would help.
Regards,
Martijn
On Fri, Nov 12, 2010 at 3:21 AM, Kris Zyp <kri...@gmail.com> wrote:
> I have attached the latest version of draft-03. Gary Court has done some
> awesome work to get this improved and in much better shape. I would like
> to get this published soon. I know there are still plenty of discussion
> and improvements to be made for JSON Schema, but I think the major
> topics for draft-03 have been addressed, and it is time to get this
> submitted to IETF.
Cool! I just sent you a push request with a few more language fixes to
the spec, I hope you can merge them.
> Let me know if you think there are any blockers that
> need to address.
I think the biggest issue I have with draft 03 is that it doesn't
really clarify the rules for extends. I posted my analysis just now,
along with some suggestions. My worry is that the rules for extends as
stated describe that validators should validate extending schemas and
reject them if they break rules, and that this is difficult to
implement. When implementing draft 02 this was the biggest source of
confusion. I still have to think very carefully each time I think
about this section, and I'm still not sure I'm getting it right each
time. I think it would help to add the minimal implementation
suggestion I made (check against both schemas without an attempt at
merging them), if that at least is correct.
Too bad the ability to use a schema in the submission link properties
wasn't discussed, but I don't think that's a blocker.
Regards,
Martijn
Thanks to everyone for their involvement in this!
-Gary
Thanks Kris!
Regards,
Martijn