Object schemas, currently, only support well-defined properties. JSON-Schema defines a key "additionalProperties" as a boolean, expressing whether or not the data may include unorganized extras along with the normal data.
This should be supported. Dynamic languages (ruby, python, js) should just attach further data onto their instances without question. Typed languages (Go, Java, C#) should include a generic "getAttribute" and "setAttribute" method (with appropriately vague interface{}, or Object types for return/set), and have a protected/unexported member associative array which can be modified underneath.
This isn't a good design pattern, but it may have uses (such as when forwarding unknown data in a payload).
Object schemas, currently, only support well-defined properties. JSON-Schema defines a key "additionalProperties" as a boolean, expressing whether or not the data may include unorganized extras along with the normal data.
This should be supported. Dynamic languages (ruby, python, js) should just attach further data onto their instances without question. Typed languages (Go, Java, C#) should include a generic "getAttribute" and "setAttribute" method (with appropriately vague
interface{}, orObjecttypes for return/set), and have a protected/unexported member associative array which can be modified underneath.This isn't a good design pattern, but it may have uses (such as when forwarding unknown data in a payload).