by gcb · 14y ago · 0 comments
What if i look at your API output and assume it's json (only got unique items) but it's rjson? Or whatever?
The most important thing when adding another layer to a protocol is identification.
So, please, put the whole altered object into a rjson root node so it's clear what we're dealing with.
The ideal place to handle this is (as pointed out above) content negociation - specifically as 'application/rjson+json'