[Pkg-javascript-commits] [backbone] 02/19: augmenting the docs for Model#toJSON

Jonas Smedegaard js at moszumanska.debian.org
Sat May 3 16:58:37 UTC 2014


This is an automated email from the git hooks/post-receive script.

js pushed a commit to tag 0.1.1
in repository backbone.

commit cd0d2ccb1c6460bd6d756b3140cd1eb592737143
Author: Jeremy Ashkenas <jashkenas at gmail.com>
Date:   Wed Oct 13 14:20:14 2010 -0400

    augmenting the docs for Model#toJSON
---
 index.html | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/index.html b/index.html
index 31b29c5..953c4d8 100644
--- a/index.html
+++ b/index.html
@@ -526,11 +526,13 @@ note.set({title: "October 12", content: "Lorem Ipsum Dolor Sit Amet..."});
     </p>
 
     <p id="Model-toJSON">
-      <b class="header">toJSON</b><code>model.toJSON</code>
+      <b class="header">toJSON</b><code>model.toJSON()</code>
       <br />
       Return a copy of the model's <a href="#Model-attributes">attributes</a> for JSON stringification.
       This can be used for persistence, serialization, or for augmentation before
-      being handed off to a view.
+      being handed off to a view. The name of this method is a bit confusing, as
+      it doesn't actually return a JSON string — but I'm afraid that it's 
+      the way that the <a href="https://developer.mozilla.org/en/JSON#toJSON()_method">JavaScript API for <b>JSON.stringify</b> works</a>.
     </p>
 
 <pre class="runnable">

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-javascript/backbone.git



More information about the Pkg-javascript-commits mailing list