resource / Front-End-Standards

Front-end development standards for Resource.
MIT License
23 stars 1 forks source link

JSON: Use of "data" property is not context agnostic #40

Closed Krxtopher closed 10 years ago

Krxtopher commented 11 years ago

Feel free to overrule me on this one, but... Although use of a top-level "data" property is a good recommendation for JSON-formatted responses from service calls, there are many other contexts in which JSON may be used on Resource projects. Just one example is configuration files. In that context, having a top-level "data" property probably isn't a good design choice.

Although the "data" property is a good recommendation for some scenarios, since it's not universally applicable I'd recommend leaving it out of our general JSON standards.

nicetransition commented 11 years ago

I'm with you on this... but do you think this is realistic? I'd love to hear input from Raj, Brice, @daveespionage and some of the back-end focused guys on this.

I like this as a recommendation "when possible"

LukeAskew commented 11 years ago

Perhaps it would be useful to create a section specifically for "API" guidelines.

I wrote this draft with APIs in mind, but I understand the need to outline some general JSON standards fro config files etc...

nicetransition commented 11 years ago

I think that would be a good idea

LukeAskew commented 10 years ago

Removed JSON standards draft as JSON formatting/semantics can vary depending on application context. Defining standards here doesn't seem worthwhile.