$ref now implemented!

130 views
Skip to first unread message

Json Schema

unread,
Apr 20, 2012, 6:14:47 PM4/20/12
to json-...@googlegroups.com
Hello,

I know I said I would wait before implementing new features, but I couldn't wait. Walter, you mentioned something to do with this:

Loading a schema with $ref will load that schema into the resulting schema.  

It's only a prototype implementation, the final version will allow this feature to be switched on or off. You can test it by loading the following schema that is a hack of the example you  provided in your email http://json-schema.org/card. Remember to set the radio button to 'JSON Schema'. It has been uploaded to http://www.jsonschema.net


{
"description": "A representation of a person, company, organization, or place",
"type": "object",
"properties": {
"adr": {
"$ref": "http://json-schema.org/address"
},
"geo": {
"$ref" : "http://json-schema.org/geo"
},
"org": {
"type": "object",
"properties": {
"organizationName": {
"type": "string"
},
"organizationUnit": {
"type": "string"
}
}
}
}
}


Is this sort of functionality useful to you?

Jack


Xample

unread,
May 10, 2012, 12:27:36 PM5/10/12
to json-...@googlegroups.com
Hi, your code generates several ids, that's an idea (…) but why this replication ?
If the purpose was to make some absolute refs, you should therefore prefix them with a #sharp (but I do not think it was the case)
 
Reply all
Reply to author
Forward
0 new messages