mirror of
https://github.com/jashkenas/backbone.git
synced 2026-01-23 05:48:10 -05:00
a note about namespacing JSON requests.
This commit is contained in:
@@ -1017,7 +1017,10 @@ var Notes = Backbone.Collection.extend({
|
||||
<p>
|
||||
The server handler for <b>fetch</b> requests should return a JSON list of
|
||||
models, namespaced under "models": <tt>{"models": [...]}</tt> —
|
||||
additional information can be returned with the response under different keys.
|
||||
instead of returning the
|
||||
array directly, we ask you to namespace your models like this by default,
|
||||
so that it's possible to send down out-of-band information
|
||||
for things like pagination or error states.
|
||||
</p>
|
||||
|
||||
<pre class="runnable">
|
||||
|
||||
Reference in New Issue
Block a user