views:

41

answers:

2
+1  Q: 

Namespaces in JSON

Is there such a thing as JSON namespaces, just like XML namespaces? Has anyone created a spec or libraries for this? Is this a good or a terrible idea?

I want to make a data spec that can be represented in XML as well as JSON. However I also need the namespace concept, that the data can be extended by annotations in different vocabularies.

To be more specific, this is about representing events. My schema will describe the event in basic terms (time and location), though if you think about it, events can be annotated with different information e.g. attendees or image URLs which I don't want to specify in my schema.

+1  A: 

I think, KISS (keep it simple & stupid) is one of the main principles in JSON. So - no namespaces there.

naivists
A: 

JSON Schema might be the right thing for this:

http://json-schema.org/

Althought I don't know how well it's implemented.

Russ C