Last active
August 29, 2015 14:22
-
-
Save glanotte/421892bdc40bb02b429e to your computer and use it in GitHub Desktop.
Collection+JSON item-error extension
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"collection": { | |
"version": "123", | |
"items": [{ | |
"href": "http://example.com/contacts/1", | |
"data": [ | |
{"name": "id", "value": "1"} | |
] | |
},{ | |
"item-error": "This object is invalid", | |
"data": [ | |
{"name": "id", "value": ""} | |
] | |
},{ | |
"href": "http://example.com/contacts/2", | |
"data": [ | |
{"name": "id", "value": "1"} | |
] | |
}] | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
@glanotte
ok, i think i see what you're saying. you want an error property on the item, not the data element (as i suggested) and not just on the representation (where it is now).
so, are you ok, w/ a single string (
"itemerror" : "not valid"
)?would a boolean work just as well (
"itemerror" : "true"
)?do you really need an object here? (
"itemerror" : {"code" : "123", "message" : "invalid object"}
)?do you plan do use something at the data level at some point?
in human-drive UIs, how do you see this
"itemerror"
being handled? rendered as a message? something else?