Upgrade to ExtJS 4.0.1 - Released 05/18/2011
[extjs.git] / docs / source / Json2.html
index 82ab99c..05de884 100644 (file)
@@ -1,14 +1,36 @@
-<!DOCTYPE html><html><head><title>Sencha Documentation Project</title><link rel="stylesheet" href="../reset.css" type="text/css"><link rel="stylesheet" href="../prettify.css" type="text/css"><link rel="stylesheet" href="../prettify_sa.css" type="text/css"><script type="text/javascript" src="../prettify.js"></script></head><body onload="prettyPrint()"><pre class="prettyprint"><pre><span id='Ext-data.writer.Json'>/**
+<!DOCTYPE html>
+<html>
+<head>
+  <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+  <title>The source code</title>
+  <link href="../prettify/prettify.css" type="text/css" rel="stylesheet" />
+  <script type="text/javascript" src="../prettify/prettify.js"></script>
+  <style type="text/css">
+    .highlight { display: block; background-color: #ddd; }
+  </style>
+  <script type="text/javascript">
+    function highlight() {
+      document.getElementById(location.hash.replace(/#/, "")).className = "highlight";
+    }
+  </script>
+</head>
+<body onload="prettyPrint(); highlight();">
+  <pre class="prettyprint lang-js"><span id='Ext-data-writer-Json'>/**
 </span> * @class Ext.data.writer.Json
  * @extends Ext.data.writer.Writer
- * @ignore
+
+This class is used to write {@link Ext.data.Model} data to the server in a JSON format.
+The {@link #allowSingle} configuration can be set to false to force the records to always be
+encoded in an array, even if there is only a single record being sent.
+
+ * @markdown
  */
 Ext.define('Ext.data.writer.Json', {
     extend: 'Ext.data.writer.Writer',
     alternateClassName: 'Ext.data.JsonWriter',
     alias: 'writer.json',
     
-<span id='Ext-data.writer.Json-cfg-root'>    /**
+<span id='Ext-data-writer-Json-cfg-root'>    /**
 </span>     * @cfg {String} root The key under which the records in this Writer will be placed. Defaults to &lt;tt&gt;undefined&lt;/tt&gt;.
      * Example generated request, using root: 'records':
 &lt;pre&gt;&lt;code&gt;
@@ -17,7 +39,7 @@ Ext.define('Ext.data.writer.Json', {
      */
     root: undefined,
     
-<span id='Ext-data.writer.Json-cfg-encode'>    /**
+<span id='Ext-data-writer-Json-cfg-encode'>    /**
 </span>     * @cfg {Boolean} encode True to use Ext.encode() on the data before sending. Defaults to &lt;tt&gt;false&lt;/tt&gt;.
      * The encode option should only be set to true when a {@link #root} is defined, because the values will be
      * sent as part of the request parameters as opposed to a raw post. The root will be the name of the parameter
@@ -25,7 +47,7 @@ Ext.define('Ext.data.writer.Json', {
      */
     encode: false,
     
-<span id='Ext-data.writer.Json-cfg-allowSingle'>    /**
+<span id='Ext-data-writer-Json-cfg-allowSingle'>    /**
 </span>     * @cfg {Boolean} allowSingle False to ensure that records are always wrapped in an array, even if there is only
      * one record being sent. When there is more than one record, they will always be encoded into an array.
      * Defaults to &lt;tt&gt;true&lt;/tt&gt;. Example:
@@ -75,4 +97,6 @@ Ext.define('Ext.data.writer.Json', {
         return request;
     }
 });
-</pre></pre></body></html>
\ No newline at end of file
+</pre>
+</body>
+</html>