diff options
Diffstat (limited to 'doc/classes')
52 files changed, 0 insertions, 11735 deletions
diff --git a/doc/classes/BigDecimal.html b/doc/classes/BigDecimal.html deleted file mode 100644 index d4362c3..0000000 --- a/doc/classes/BigDecimal.html +++ /dev/null @@ -1,226 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" - "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> -<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> -<head> - <title>BigDecimal</title> - <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> - <link rel="stylesheet" href="../css/reset.css" type="text/css" media="screen" /> -<link rel="stylesheet" href="../css/main.css" type="text/css" media="screen" /> -<link rel="stylesheet" href="../css/github.css" type="text/css" media="screen" /> -<script src="../js/jquery-1.3.2.min.js" type="text/javascript" charset="utf-8"></script> -<script src="../js/jquery-effect.js" type="text/javascript" charset="utf-8"></script> -<script src="../js/main.js" type="text/javascript" charset="utf-8"></script> -<script src="../js/highlight.pack.js" type="text/javascript" charset="utf-8"></script> - -</head> - -<body> - <div class="banner"> - - <h1> - <span class="type">Class</span> - BigDecimal - - <span class="parent">< - - Object - - </span> - - </h1> - <ul class="files"> - - <li><a href="../files/lib/json/add/bigdecimal_rb.html">lib/json/add/bigdecimal.rb</a></li> - - </ul> - </div> - <div id="bodyContent"> - <div id="content"> - - - - - - - - - - - - - - - <!-- Method ref --> - <div class="sectiontitle">Methods</div> - <dl class="methods"> - - <dt>A</dt> - <dd> - <ul> - - - <li> - <a href="#method-i-as_json">as_json</a> - </li> - - </ul> - </dd> - - <dt>J</dt> - <dd> - <ul> - - - <li> - <a href="#method-c-json_create">json_create</a> - </li> - - </ul> - </dd> - - <dt>T</dt> - <dd> - <ul> - - - <li> - <a href="#method-i-to_json">to_json</a> - </li> - - </ul> - </dd> - - </dl> - - - - - - - - - - - - - - - - - - - <!-- Methods --> - - <div class="sectiontitle">Class Public methods</div> - - <div class="method"> - <div class="title method-title" id="method-c-json_create"> - - <a name="method-c-json_create"></a><b>json_create</b>(object) - - </div> - - - <div class="description"> - - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-c-json_create_source')" id="l_method-c-json_create_source">show</a> - - </p> - <div id="method-c-json_create_source" class="dyn-source"> - <pre><span class="ruby-comment"># File lib/json/add/bigdecimal.rb, line 7</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">self</span>.<span class="ruby-identifier">json_create</span>(<span class="ruby-identifier">object</span>) - <span class="ruby-constant">BigDecimal</span>.<span class="ruby-identifier">_load</span> <span class="ruby-identifier">object</span>[<span class="ruby-string">'b'</span>] -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - - <div class="sectiontitle">Instance Public methods</div> - - <div class="method"> - <div class="title method-title" id="method-i-as_json"> - - <a name="method-i-as_json"></a><b>as_json</b>(*) - - </div> - - - <div class="description"> - - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-as_json_source')" id="l_method-i-as_json_source">show</a> - - </p> - <div id="method-i-as_json_source" class="dyn-source"> - <pre><span class="ruby-comment"># File lib/json/add/bigdecimal.rb, line 11</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">as_json</span>(*) - { - <span class="ruby-constant">JSON</span>.<span class="ruby-identifier">create_id</span> =<span class="ruby-operator">></span> <span class="ruby-keyword">self</span>.<span class="ruby-identifier">class</span>.<span class="ruby-identifier">name</span>, - <span class="ruby-string">'b'</span> =<span class="ruby-operator">></span> <span class="ruby-identifier">_dump</span>, - } -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - - <div class="method"> - <div class="title method-title" id="method-i-to_json"> - - <a name="method-i-to_json"></a><b>to_json</b>(*) - - </div> - - - <div class="description"> - - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-to_json_source')" id="l_method-i-to_json_source">show</a> - - </p> - <div id="method-i-to_json_source" class="dyn-source"> - <pre><span class="ruby-comment"># File lib/json/add/bigdecimal.rb, line 18</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">to_json</span>(*) - <span class="ruby-identifier">as_json</span>.<span class="ruby-identifier">to_json</span> -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - </div> - </div> - </body> -</html>
\ No newline at end of file diff --git a/doc/classes/Class.html b/doc/classes/Class.html deleted file mode 100644 index 18ee776..0000000 --- a/doc/classes/Class.html +++ /dev/null @@ -1,139 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" - "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> -<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> -<head> - <title>Class</title> - <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> - <link rel="stylesheet" href="../css/reset.css" type="text/css" media="screen" /> -<link rel="stylesheet" href="../css/main.css" type="text/css" media="screen" /> -<link rel="stylesheet" href="../css/github.css" type="text/css" media="screen" /> -<script src="../js/jquery-1.3.2.min.js" type="text/javascript" charset="utf-8"></script> -<script src="../js/jquery-effect.js" type="text/javascript" charset="utf-8"></script> -<script src="../js/main.js" type="text/javascript" charset="utf-8"></script> -<script src="../js/highlight.pack.js" type="text/javascript" charset="utf-8"></script> - -</head> - -<body> - <div class="banner"> - - <h1> - <span class="type">Class</span> - Class - - <span class="parent">< - - Object - - </span> - - </h1> - <ul class="files"> - - <li><a href="../files/lib/json/common_rb.html">lib/json/common.rb</a></li> - - </ul> - </div> - <div id="bodyContent"> - <div id="content"> - - <div class="description"> - -<p>Extends any <a href="Class.html">Class</a> to include -<em>json_creatable?</em> method.</p> - - </div> - - - - - - - - - - - - - - - <!-- Method ref --> - <div class="sectiontitle">Methods</div> - <dl class="methods"> - - <dt>J</dt> - <dd> - <ul> - - - <li> - <a href="#method-i-json_creatable-3F">json_creatable?</a> - </li> - - </ul> - </dd> - - </dl> - - - - - - - - - - - - - - - - - - - <!-- Methods --> - - <div class="sectiontitle">Instance Public methods</div> - - <div class="method"> - <div class="title method-title" id="method-i-json_creatable-3F"> - - <a name="method-i-json_creatable-3F"></a><b>json_creatable?</b>() - - </div> - - - <div class="description"> - <p>Returns true if this class can be used to create an instance from a -serialised <a href="JSON.html">JSON</a> string. The class has to implement -a class method <em>json_create</em> that expects a hash as first parameter. -The hash should include the required data.</p> - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-json_creatable-3F_source')" id="l_method-i-json_creatable-3F_source">show</a> - - </p> - <div id="method-i-json_creatable-3F_source" class="dyn-source"> - <pre><span class="ruby-comment"># File lib/json/common.rb, line 467</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">json_creatable?</span> - <span class="ruby-identifier">respond_to?</span>(<span class="ruby-value">:json_create</span>) -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - </div> - </div> - </body> -</html>
\ No newline at end of file diff --git a/doc/classes/Complex.html b/doc/classes/Complex.html deleted file mode 100644 index 6c90ef2..0000000 --- a/doc/classes/Complex.html +++ /dev/null @@ -1,227 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" - "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> -<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> -<head> - <title>Complex</title> - <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> - <link rel="stylesheet" href="../css/reset.css" type="text/css" media="screen" /> -<link rel="stylesheet" href="../css/main.css" type="text/css" media="screen" /> -<link rel="stylesheet" href="../css/github.css" type="text/css" media="screen" /> -<script src="../js/jquery-1.3.2.min.js" type="text/javascript" charset="utf-8"></script> -<script src="../js/jquery-effect.js" type="text/javascript" charset="utf-8"></script> -<script src="../js/main.js" type="text/javascript" charset="utf-8"></script> -<script src="../js/highlight.pack.js" type="text/javascript" charset="utf-8"></script> - -</head> - -<body> - <div class="banner"> - - <h1> - <span class="type">Class</span> - Complex - - <span class="parent">< - - Object - - </span> - - </h1> - <ul class="files"> - - <li><a href="../files/lib/json/add/complex_rb.html">lib/json/add/complex.rb</a></li> - - </ul> - </div> - <div id="bodyContent"> - <div id="content"> - - - - - - - - - - - - - - - <!-- Method ref --> - <div class="sectiontitle">Methods</div> - <dl class="methods"> - - <dt>A</dt> - <dd> - <ul> - - - <li> - <a href="#method-i-as_json">as_json</a> - </li> - - </ul> - </dd> - - <dt>J</dt> - <dd> - <ul> - - - <li> - <a href="#method-c-json_create">json_create</a> - </li> - - </ul> - </dd> - - <dt>T</dt> - <dd> - <ul> - - - <li> - <a href="#method-i-to_json">to_json</a> - </li> - - </ul> - </dd> - - </dl> - - - - - - - - - - - - - - - - - - - <!-- Methods --> - - <div class="sectiontitle">Class Public methods</div> - - <div class="method"> - <div class="title method-title" id="method-c-json_create"> - - <a name="method-c-json_create"></a><b>json_create</b>(object) - - </div> - - - <div class="description"> - - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-c-json_create_source')" id="l_method-c-json_create_source">show</a> - - </p> - <div id="method-c-json_create_source" class="dyn-source"> - <pre><span class="ruby-comment"># File lib/json/add/complex.rb, line 7</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">self</span>.<span class="ruby-identifier">json_create</span>(<span class="ruby-identifier">object</span>) - <span class="ruby-constant">Complex</span>(<span class="ruby-identifier">object</span>[<span class="ruby-string">'r'</span>], <span class="ruby-identifier">object</span>[<span class="ruby-string">'i'</span>]) -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - - <div class="sectiontitle">Instance Public methods</div> - - <div class="method"> - <div class="title method-title" id="method-i-as_json"> - - <a name="method-i-as_json"></a><b>as_json</b>(*) - - </div> - - - <div class="description"> - - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-as_json_source')" id="l_method-i-as_json_source">show</a> - - </p> - <div id="method-i-as_json_source" class="dyn-source"> - <pre><span class="ruby-comment"># File lib/json/add/complex.rb, line 11</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">as_json</span>(*) - { - <span class="ruby-constant">JSON</span>.<span class="ruby-identifier">create_id</span> =<span class="ruby-operator">></span> <span class="ruby-keyword">self</span>.<span class="ruby-identifier">class</span>.<span class="ruby-identifier">name</span>, - <span class="ruby-string">'r'</span> =<span class="ruby-operator">></span> <span class="ruby-identifier">real</span>, - <span class="ruby-string">'i'</span> =<span class="ruby-operator">></span> <span class="ruby-identifier">imag</span>, - } -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - - <div class="method"> - <div class="title method-title" id="method-i-to_json"> - - <a name="method-i-to_json"></a><b>to_json</b>(*) - - </div> - - - <div class="description"> - - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-to_json_source')" id="l_method-i-to_json_source">show</a> - - </p> - <div id="method-i-to_json_source" class="dyn-source"> - <pre><span class="ruby-comment"># File lib/json/add/complex.rb, line 19</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">to_json</span>(*) - <span class="ruby-identifier">as_json</span>.<span class="ruby-identifier">to_json</span> -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - </div> - </div> - </body> -</html>
\ No newline at end of file diff --git a/doc/classes/Date.html b/doc/classes/Date.html deleted file mode 100644 index 079c6e9..0000000 --- a/doc/classes/Date.html +++ /dev/null @@ -1,240 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" - "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> -<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> -<head> - <title>Date</title> - <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> - <link rel="stylesheet" href="../css/reset.css" type="text/css" media="screen" /> -<link rel="stylesheet" href="../css/main.css" type="text/css" media="screen" /> -<link rel="stylesheet" href="../css/github.css" type="text/css" media="screen" /> -<script src="../js/jquery-1.3.2.min.js" type="text/javascript" charset="utf-8"></script> -<script src="../js/jquery-effect.js" type="text/javascript" charset="utf-8"></script> -<script src="../js/main.js" type="text/javascript" charset="utf-8"></script> -<script src="../js/highlight.pack.js" type="text/javascript" charset="utf-8"></script> - -</head> - -<body> - <div class="banner"> - - <h1> - <span class="type">Class</span> - Date - - <span class="parent">< - - Object - - </span> - - </h1> - <ul class="files"> - - <li><a href="../files/lib/json/add/date_rb.html">lib/json/add/date.rb</a></li> - - </ul> - </div> - <div id="bodyContent"> - <div id="content"> - - <div class="description"> - -<p><a href="Date.html">Date</a> serialization/deserialization</p> - - </div> - - - - - - - - - - - - - - - <!-- Method ref --> - <div class="sectiontitle">Methods</div> - <dl class="methods"> - - <dt>A</dt> - <dd> - <ul> - - - <li> - <a href="#method-i-as_json">as_json</a> - </li> - - </ul> - </dd> - - <dt>J</dt> - <dd> - <ul> - - - <li> - <a href="#method-c-json_create">json_create</a> - </li> - - </ul> - </dd> - - <dt>T</dt> - <dd> - <ul> - - - <li> - <a href="#method-i-to_json">to_json</a> - </li> - - </ul> - </dd> - - </dl> - - - - - - - - - - - - - - - - - - - <!-- Methods --> - - <div class="sectiontitle">Class Public methods</div> - - <div class="method"> - <div class="title method-title" id="method-c-json_create"> - - <a name="method-c-json_create"></a><b>json_create</b>(object) - - </div> - - - <div class="description"> - <p>Deserializes <a href="JSON.html">JSON</a> string by converting Julian year -<code>y</code>, month <code>m</code>, day <code>d</code> and Day of -Calendar Reform <code>sg</code> to <a href="Date.html">Date</a>.</p> - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-c-json_create_source')" id="l_method-c-json_create_source">show</a> - - </p> - <div id="method-c-json_create_source" class="dyn-source"> - <pre><span class="ruby-comment"># File lib/json/add/date.rb, line 11</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">self</span>.<span class="ruby-identifier">json_create</span>(<span class="ruby-identifier">object</span>) - <span class="ruby-identifier">civil</span>(*<span class="ruby-identifier">object</span>.<span class="ruby-identifier">values_at</span>(<span class="ruby-string">'y'</span>, <span class="ruby-string">'m'</span>, <span class="ruby-string">'d'</span>, <span class="ruby-string">'sg'</span>)) -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - - <div class="sectiontitle">Instance Public methods</div> - - <div class="method"> - <div class="title method-title" id="method-i-as_json"> - - <a name="method-i-as_json"></a><b>as_json</b>(*) - - </div> - - - <div class="description"> - <p>Returns a hash, that will be turned into a <a href="JSON.html">JSON</a> -object and represent this object.</p> - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-as_json_source')" id="l_method-i-as_json_source">show</a> - - </p> - <div id="method-i-as_json_source" class="dyn-source"> - <pre><span class="ruby-comment"># File lib/json/add/date.rb, line 19</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">as_json</span>(*) - { - <span class="ruby-constant">JSON</span>.<span class="ruby-identifier">create_id</span> =<span class="ruby-operator">></span> <span class="ruby-keyword">self</span>.<span class="ruby-identifier">class</span>.<span class="ruby-identifier">name</span>, - <span class="ruby-string">'y'</span> =<span class="ruby-operator">></span> <span class="ruby-identifier">year</span>, - <span class="ruby-string">'m'</span> =<span class="ruby-operator">></span> <span class="ruby-identifier">month</span>, - <span class="ruby-string">'d'</span> =<span class="ruby-operator">></span> <span class="ruby-identifier">day</span>, - <span class="ruby-string">'sg'</span> =<span class="ruby-operator">></span> <span class="ruby-identifier">start</span>, - } -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - - <div class="method"> - <div class="title method-title" id="method-i-to_json"> - - <a name="method-i-to_json"></a><b>to_json</b>(*args) - - </div> - - - <div class="description"> - <p>Stores class name (<a href="Date.html">Date</a>) with Julian year -<code>y</code>, month <code>m</code>, day <code>d</code> and Day of -Calendar Reform <code>sg</code> as <a href="JSON.html">JSON</a> string</p> - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-to_json_source')" id="l_method-i-to_json_source">show</a> - - </p> - <div id="method-i-to_json_source" class="dyn-source"> - <pre><span class="ruby-comment"># File lib/json/add/date.rb, line 31</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">to_json</span>(*<span class="ruby-identifier">args</span>) - <span class="ruby-identifier">as_json</span>.<span class="ruby-identifier">to_json</span>(*<span class="ruby-identifier">args</span>) -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - </div> - </div> - </body> -</html>
\ No newline at end of file diff --git a/doc/classes/DateTime.html b/doc/classes/DateTime.html deleted file mode 100644 index 2819094..0000000 --- a/doc/classes/DateTime.html +++ /dev/null @@ -1,256 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" - "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> -<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> -<head> - <title>DateTime</title> - <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> - <link rel="stylesheet" href="../css/reset.css" type="text/css" media="screen" /> -<link rel="stylesheet" href="../css/main.css" type="text/css" media="screen" /> -<link rel="stylesheet" href="../css/github.css" type="text/css" media="screen" /> -<script src="../js/jquery-1.3.2.min.js" type="text/javascript" charset="utf-8"></script> -<script src="../js/jquery-effect.js" type="text/javascript" charset="utf-8"></script> -<script src="../js/main.js" type="text/javascript" charset="utf-8"></script> -<script src="../js/highlight.pack.js" type="text/javascript" charset="utf-8"></script> - -</head> - -<body> - <div class="banner"> - - <h1> - <span class="type">Class</span> - DateTime - - <span class="parent">< - - Object - - </span> - - </h1> - <ul class="files"> - - <li><a href="../files/lib/json/add/date_time_rb.html">lib/json/add/date_time.rb</a></li> - - </ul> - </div> - <div id="bodyContent"> - <div id="content"> - - <div class="description"> - -<p><a href="DateTime.html">DateTime</a> serialization/deserialization</p> - - </div> - - - - - - - - - - - - - - - <!-- Method ref --> - <div class="sectiontitle">Methods</div> - <dl class="methods"> - - <dt>A</dt> - <dd> - <ul> - - - <li> - <a href="#method-i-as_json">as_json</a> - </li> - - </ul> - </dd> - - <dt>J</dt> - <dd> - <ul> - - - <li> - <a href="#method-c-json_create">json_create</a> - </li> - - </ul> - </dd> - - <dt>T</dt> - <dd> - <ul> - - - <li> - <a href="#method-i-to_json">to_json</a> - </li> - - </ul> - </dd> - - </dl> - - - - - - - - - - - - - - - - - - - <!-- Methods --> - - <div class="sectiontitle">Class Public methods</div> - - <div class="method"> - <div class="title method-title" id="method-c-json_create"> - - <a name="method-c-json_create"></a><b>json_create</b>(object) - - </div> - - - <div class="description"> - <p>Deserializes <a href="JSON.html">JSON</a> string by converting year -<code>y</code>, month <code>m</code>, day <code>d</code>, hour -<code>H</code>, minute <code>M</code>, second <code>S</code>, offset -<code>of</code> and Day of Calendar Reform <code>sg</code> to <a -href="DateTime.html">DateTime</a>.</p> - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-c-json_create_source')" id="l_method-c-json_create_source">show</a> - - </p> - <div id="method-c-json_create_source" class="dyn-source"> - <pre><span class="ruby-comment"># File lib/json/add/date_time.rb, line 12</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">self</span>.<span class="ruby-identifier">json_create</span>(<span class="ruby-identifier">object</span>) - <span class="ruby-identifier">args</span> = <span class="ruby-identifier">object</span>.<span class="ruby-identifier">values_at</span>(<span class="ruby-string">'y'</span>, <span class="ruby-string">'m'</span>, <span class="ruby-string">'d'</span>, <span class="ruby-string">'H'</span>, <span class="ruby-string">'M'</span>, <span class="ruby-string">'S'</span>) - <span class="ruby-identifier">of_a</span>, <span class="ruby-identifier">of_b</span> = <span class="ruby-identifier">object</span>[<span class="ruby-string">'of'</span>].<span class="ruby-identifier">split</span>(<span class="ruby-string">'/'</span>) - <span class="ruby-keyword">if</span> <span class="ruby-identifier">of_b</span> <span class="ruby-keyword">and</span> <span class="ruby-identifier">of_b</span> <span class="ruby-operator">!=</span> <span class="ruby-string">'0'</span> - <span class="ruby-identifier">args</span> <span class="ruby-operator"><<</span> <span class="ruby-constant">Rational</span>(<span class="ruby-identifier">of_a</span>.<span class="ruby-identifier">to_i</span>, <span class="ruby-identifier">of_b</span>.<span class="ruby-identifier">to_i</span>) - <span class="ruby-keyword">else</span> - <span class="ruby-identifier">args</span> <span class="ruby-operator"><<</span> <span class="ruby-identifier">of_a</span> - <span class="ruby-keyword">end</span> - <span class="ruby-identifier">args</span> <span class="ruby-operator"><<</span> <span class="ruby-identifier">object</span>[<span class="ruby-string">'sg'</span>] - <span class="ruby-identifier">civil</span>(*<span class="ruby-identifier">args</span>) -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - - <div class="sectiontitle">Instance Public methods</div> - - <div class="method"> - <div class="title method-title" id="method-i-as_json"> - - <a name="method-i-as_json"></a><b>as_json</b>(*) - - </div> - - - <div class="description"> - <p>Returns a hash, that will be turned into a <a href="JSON.html">JSON</a> -object and represent this object.</p> - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-as_json_source')" id="l_method-i-as_json_source">show</a> - - </p> - <div id="method-i-as_json_source" class="dyn-source"> - <pre><span class="ruby-comment"># File lib/json/add/date_time.rb, line 28</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">as_json</span>(*) - { - <span class="ruby-constant">JSON</span>.<span class="ruby-identifier">create_id</span> =<span class="ruby-operator">></span> <span class="ruby-keyword">self</span>.<span class="ruby-identifier">class</span>.<span class="ruby-identifier">name</span>, - <span class="ruby-string">'y'</span> =<span class="ruby-operator">></span> <span class="ruby-identifier">year</span>, - <span class="ruby-string">'m'</span> =<span class="ruby-operator">></span> <span class="ruby-identifier">month</span>, - <span class="ruby-string">'d'</span> =<span class="ruby-operator">></span> <span class="ruby-identifier">day</span>, - <span class="ruby-string">'H'</span> =<span class="ruby-operator">></span> <span class="ruby-identifier">hour</span>, - <span class="ruby-string">'M'</span> =<span class="ruby-operator">></span> <span class="ruby-identifier">min</span>, - <span class="ruby-string">'S'</span> =<span class="ruby-operator">></span> <span class="ruby-identifier">sec</span>, - <span class="ruby-string">'of'</span> =<span class="ruby-operator">></span> <span class="ruby-identifier">offset</span>.<span class="ruby-identifier">to_s</span>, - <span class="ruby-string">'sg'</span> =<span class="ruby-operator">></span> <span class="ruby-identifier">start</span>, - } -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - - <div class="method"> - <div class="title method-title" id="method-i-to_json"> - - <a name="method-i-to_json"></a><b>to_json</b>(*args) - - </div> - - - <div class="description"> - <p>Stores class name (<a href="DateTime.html">DateTime</a>) with Julian year -<code>y</code>, month <code>m</code>, day <code>d</code>, hour -<code>H</code>, minute <code>M</code>, second <code>S</code>, offset -<code>of</code> and Day of Calendar Reform <code>sg</code> as <a -href="JSON.html">JSON</a> string</p> - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-to_json_source')" id="l_method-i-to_json_source">show</a> - - </p> - <div id="method-i-to_json_source" class="dyn-source"> - <pre><span class="ruby-comment"># File lib/json/add/date_time.rb, line 45</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">to_json</span>(*<span class="ruby-identifier">args</span>) - <span class="ruby-identifier">as_json</span>.<span class="ruby-identifier">to_json</span>(*<span class="ruby-identifier">args</span>) -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - </div> - </div> - </body> -</html>
\ No newline at end of file diff --git a/doc/classes/Exception.html b/doc/classes/Exception.html deleted file mode 100644 index 3a25aaa..0000000 --- a/doc/classes/Exception.html +++ /dev/null @@ -1,240 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" - "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> -<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> -<head> - <title>Exception</title> - <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> - <link rel="stylesheet" href="../css/reset.css" type="text/css" media="screen" /> -<link rel="stylesheet" href="../css/main.css" type="text/css" media="screen" /> -<link rel="stylesheet" href="../css/github.css" type="text/css" media="screen" /> -<script src="../js/jquery-1.3.2.min.js" type="text/javascript" charset="utf-8"></script> -<script src="../js/jquery-effect.js" type="text/javascript" charset="utf-8"></script> -<script src="../js/main.js" type="text/javascript" charset="utf-8"></script> -<script src="../js/highlight.pack.js" type="text/javascript" charset="utf-8"></script> - -</head> - -<body> - <div class="banner"> - - <h1> - <span class="type">Class</span> - Exception - - <span class="parent">< - - Object - - </span> - - </h1> - <ul class="files"> - - <li><a href="../files/lib/json/add/exception_rb.html">lib/json/add/exception.rb</a></li> - - </ul> - </div> - <div id="bodyContent"> - <div id="content"> - - <div class="description"> - -<p><a href="Exception.html">Exception</a> serialization/deserialization</p> - - </div> - - - - - - - - - - - - - - - <!-- Method ref --> - <div class="sectiontitle">Methods</div> - <dl class="methods"> - - <dt>A</dt> - <dd> - <ul> - - - <li> - <a href="#method-i-as_json">as_json</a> - </li> - - </ul> - </dd> - - <dt>J</dt> - <dd> - <ul> - - - <li> - <a href="#method-c-json_create">json_create</a> - </li> - - </ul> - </dd> - - <dt>T</dt> - <dd> - <ul> - - - <li> - <a href="#method-i-to_json">to_json</a> - </li> - - </ul> - </dd> - - </dl> - - - - - - - - - - - - - - - - - - - <!-- Methods --> - - <div class="sectiontitle">Class Public methods</div> - - <div class="method"> - <div class="title method-title" id="method-c-json_create"> - - <a name="method-c-json_create"></a><b>json_create</b>(object) - - </div> - - - <div class="description"> - <p>Deserializes <a href="JSON.html">JSON</a> string by constructing new <a -href="Exception.html">Exception</a> object with message <code>m</code> and -backtrace <code>b</code> serialized with <code>to_json</code></p> - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-c-json_create_source')" id="l_method-c-json_create_source">show</a> - - </p> - <div id="method-c-json_create_source" class="dyn-source"> - <pre><span class="ruby-comment"># File lib/json/add/exception.rb, line 10</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">self</span>.<span class="ruby-identifier">json_create</span>(<span class="ruby-identifier">object</span>) - <span class="ruby-identifier">result</span> = <span class="ruby-identifier">new</span>(<span class="ruby-identifier">object</span>[<span class="ruby-string">'m'</span>]) - <span class="ruby-identifier">result</span>.<span class="ruby-identifier">set_backtrace</span> <span class="ruby-identifier">object</span>[<span class="ruby-string">'b'</span>] - <span class="ruby-identifier">result</span> -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - - <div class="sectiontitle">Instance Public methods</div> - - <div class="method"> - <div class="title method-title" id="method-i-as_json"> - - <a name="method-i-as_json"></a><b>as_json</b>(*) - - </div> - - - <div class="description"> - <p>Returns a hash, that will be turned into a <a href="JSON.html">JSON</a> -object and represent this object.</p> - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-as_json_source')" id="l_method-i-as_json_source">show</a> - - </p> - <div id="method-i-as_json_source" class="dyn-source"> - <pre><span class="ruby-comment"># File lib/json/add/exception.rb, line 18</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">as_json</span>(*) - { - <span class="ruby-constant">JSON</span>.<span class="ruby-identifier">create_id</span> =<span class="ruby-operator">></span> <span class="ruby-keyword">self</span>.<span class="ruby-identifier">class</span>.<span class="ruby-identifier">name</span>, - <span class="ruby-string">'m'</span> =<span class="ruby-operator">></span> <span class="ruby-identifier">message</span>, - <span class="ruby-string">'b'</span> =<span class="ruby-operator">></span> <span class="ruby-identifier">backtrace</span>, - } -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - - <div class="method"> - <div class="title method-title" id="method-i-to_json"> - - <a name="method-i-to_json"></a><b>to_json</b>(*args) - - </div> - - - <div class="description"> - <p>Stores class name (<a href="Exception.html">Exception</a>) with message -<code>m</code> and backtrace array <code>b</code> as <a -href="JSON.html">JSON</a> string</p> - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-to_json_source')" id="l_method-i-to_json_source">show</a> - - </p> - <div id="method-i-to_json_source" class="dyn-source"> - <pre><span class="ruby-comment"># File lib/json/add/exception.rb, line 28</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">to_json</span>(*<span class="ruby-identifier">args</span>) - <span class="ruby-identifier">as_json</span>.<span class="ruby-identifier">to_json</span>(*<span class="ruby-identifier">args</span>) -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - </div> - </div> - </body> -</html>
\ No newline at end of file diff --git a/doc/classes/JSON.html b/doc/classes/JSON.html deleted file mode 100644 index 7967c39..0000000 --- a/doc/classes/JSON.html +++ /dev/null @@ -1,1142 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" - "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> -<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> -<head> - <title>JSON</title> - <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> - <link rel="stylesheet" href="../css/reset.css" type="text/css" media="screen" /> -<link rel="stylesheet" href="../css/main.css" type="text/css" media="screen" /> -<link rel="stylesheet" href="../css/github.css" type="text/css" media="screen" /> -<script src="../js/jquery-1.3.2.min.js" type="text/javascript" charset="utf-8"></script> -<script src="../js/jquery-effect.js" type="text/javascript" charset="utf-8"></script> -<script src="../js/main.js" type="text/javascript" charset="utf-8"></script> -<script src="../js/highlight.pack.js" type="text/javascript" charset="utf-8"></script> - -</head> - -<body> - <div class="banner"> - - <h1> - <span class="type">Module</span> - JSON - - </h1> - <ul class="files"> - - <li><a href="../files/lib/json_rb.html">lib/json.rb</a></li> - - <li><a href="../files/lib/json/version_rb.html">lib/json/version.rb</a></li> - - <li><a href="../files/lib/json/common_rb.html">lib/json/common.rb</a></li> - - <li><a href="../files/lib/json/pure/generator_rb.html">lib/json/pure/generator.rb</a></li> - - <li><a href="../files/lib/json/pure/parser_rb.html">lib/json/pure/parser.rb</a></li> - - <li><a href="../files/lib/json/ext_rb.html">lib/json/ext.rb</a></li> - - <li><a href="../files/lib/json/pure_rb.html">lib/json/pure.rb</a></li> - - <li><a href="../files/ext/json/ext/parser/parser_c.html">ext/json/ext/parser/parser.c</a></li> - - <li><a href="../files/ext/json/ext/generator/generator_c.html">ext/json/ext/generator/generator.c</a></li> - - </ul> - </div> - <div id="bodyContent"> - <div id="content"> - - - - - - - - - - - - <!-- Namespace --> - <div class="sectiontitle">Namespace</div> - <ul> - - <li> - <span class="type">MODULE</span> - <a href="JSON/Ext.html">JSON::Ext</a> - </li> - - <li> - <span class="type">MODULE</span> - <a href="JSON/Pure.html">JSON::Pure</a> - </li> - - <li> - <span class="type">CLASS</span> - <a href="JSON/CircularDatastructure.html">JSON::CircularDatastructure</a> - </li> - - <li> - <span class="type">CLASS</span> - <a href="JSON/GeneratorError.html">JSON::GeneratorError</a> - </li> - - <li> - <span class="type">CLASS</span> - <a href="JSON/JSONError.html">JSON::JSONError</a> - </li> - - <li> - <span class="type">CLASS</span> - <a href="JSON/MissingUnicodeSupport.html">JSON::MissingUnicodeSupport</a> - </li> - - <li> - <span class="type">CLASS</span> - <a href="JSON/NestingError.html">JSON::NestingError</a> - </li> - - <li> - <span class="type">CLASS</span> - <a href="JSON/ParserError.html">JSON::ParserError</a> - </li> - - <li> - <span class="type">CLASS</span> - <a href="JSON/GeneratorError.html">JSON::UnparserError</a> - </li> - - </ul> - - - - - <!-- Method ref --> - <div class="sectiontitle">Methods</div> - <dl class="methods"> - - <dt>#</dt> - <dd> - <ul> - - - <li> - <a href="#method-c-5B-5D">[]</a> - </li> - - </ul> - </dd> - - <dt>C</dt> - <dd> - <ul> - - - <li> - <a href="#method-c-const_defined_in-3F">const_defined_in?</a> - </li> - - </ul> - </dd> - - <dt>D</dt> - <dd> - <ul> - - - <li> - <a href="#method-i-dump">dump</a> - </li> - - </ul> - </dd> - - <dt>F</dt> - <dd> - <ul> - - - <li> - <a href="#method-i-fast_generate">fast_generate</a> - </li> - - </ul> - </dd> - - <dt>G</dt> - <dd> - <ul> - - - <li> - <a href="#method-i-generate">generate</a> - </li> - - </ul> - </dd> - - <dt>I</dt> - <dd> - <ul> - - - <li> - <a href="#method-c-iconv">iconv</a> - </li> - - </ul> - </dd> - - <dt>L</dt> - <dd> - <ul> - - - <li> - <a href="#method-i-load">load</a> - </li> - - </ul> - </dd> - - <dt>P</dt> - <dd> - <ul> - - - <li> - <a href="#method-i-parse">parse</a>, - </li> - - - <li> - <a href="#method-i-parse-21">parse!</a>, - </li> - - - <li> - <a href="#method-i-pretty_generate">pretty_generate</a> - </li> - - </ul> - </dd> - - <dt>R</dt> - <dd> - <ul> - - - <li> - <a href="#method-i-recurse_proc">recurse_proc</a>, - </li> - - - <li> - <a href="#method-c-restore">restore</a> - </li> - - </ul> - </dd> - - </dl> - - - - - - - - - - - - - - <!-- Section constants --> - <div class="sectiontitle">Constants</div> - <table border='0' cellpadding='5'> - - <tr valign='top'> - <td class="attr-name">VERSION</td> - <td>=</td> - <td class="attr-value">'1.6.6'</td> - </tr> - - <tr valign='top'> - <td> </td> - <td colspan="2" class="attr-desc"><p><a href="JSON.html">JSON</a> version</p></td> - </tr> - - - <tr valign='top'> - <td class="attr-name">VERSION_ARRAY</td> - <td>=</td> - <td class="attr-value">VERSION.split(/\./).map { |x| x.to_i }</td> - </tr> - - <tr valign='top'> - <td> </td> - <td colspan="2" class="attr-desc"></td> - </tr> - - - <tr valign='top'> - <td class="attr-name">VERSION_MAJOR</td> - <td>=</td> - <td class="attr-value">VERSION_ARRAY[0]</td> - </tr> - - <tr valign='top'> - <td> </td> - <td colspan="2" class="attr-desc"></td> - </tr> - - - <tr valign='top'> - <td class="attr-name">VERSION_MINOR</td> - <td>=</td> - <td class="attr-value">VERSION_ARRAY[1]</td> - </tr> - - <tr valign='top'> - <td> </td> - <td colspan="2" class="attr-desc"></td> - </tr> - - - <tr valign='top'> - <td class="attr-name">VERSION_BUILD</td> - <td>=</td> - <td class="attr-value">VERSION_ARRAY[2]</td> - </tr> - - <tr valign='top'> - <td> </td> - <td colspan="2" class="attr-desc"></td> - </tr> - - - <tr valign='top'> - <td class="attr-name">NaN</td> - <td>=</td> - <td class="attr-value">0.0/0</td> - </tr> - - <tr valign='top'> - <td> </td> - <td colspan="2" class="attr-desc"></td> - </tr> - - - <tr valign='top'> - <td class="attr-name">Infinity</td> - <td>=</td> - <td class="attr-value">1.0/0</td> - </tr> - - <tr valign='top'> - <td> </td> - <td colspan="2" class="attr-desc"></td> - </tr> - - - <tr valign='top'> - <td class="attr-name">MinusInfinity</td> - <td>=</td> - <td class="attr-value">-Infinity</td> - </tr> - - <tr valign='top'> - <td> </td> - <td colspan="2" class="attr-desc"></td> - </tr> - - - <tr valign='top'> - <td class="attr-name">UnparserError</td> - <td>=</td> - <td class="attr-value">GeneratorError</td> - </tr> - - <tr valign='top'> - <td> </td> - <td colspan="2" class="attr-desc"><p>For backwards compatibility</p></td> - </tr> - - - <tr valign='top'> - <td class="attr-name">MAP</td> - <td>=</td> - <td class="attr-value">{ -"\x0" => '\u0000', -"\x1" => '\u0001', -"\x2" => '\u0002', -"\x3" => '\u0003', -"\x4" => '\u0004', -"\x5" => '\u0005', -"\x6" => '\u0006', -"\x7" => '\u0007', -"\b" => '\b', -"\t" => '\t', -"\n" => '\n', -"\xb" => '\u000b', -"\f" => '\f', -"\r" => '\r', -"\xe" => '\u000e', -"\xf" => '\u000f', -"\x10" => '\u0010', -"\x11" => '\u0011', -"\x12" => '\u0012', -"\x13" => '\u0013', -"\x14" => '\u0014', -"\x15" => '\u0015', -"\x16" => '\u0016', -"\x17" => '\u0017', -"\x18" => '\u0018', -"\x19" => '\u0019', -"\x1a" => '\u001a', -"\x1b" => '\u001b', -"\x1c" => '\u001c', -"\x1d" => '\u001d', -"\x1e" => '\u001e', -"\x1f" => '\u001f', -'"' => '\"', -'\\' => '\\\\', -}</td> - </tr> - - <tr valign='top'> - <td> </td> - <td colspan="2" class="attr-desc"></td> - </tr> - - - <tr valign='top'> - <td class="attr-name">JSON_LOADED</td> - <td>=</td> - <td class="attr-value">true unless defined?(::JSON::JSON_LOADED)</td> - </tr> - - <tr valign='top'> - <td> </td> - <td colspan="2" class="attr-desc"></td> - </tr> - - - </table> - - - - - <!-- Section attributes --> - <div class="sectiontitle">Attributes</div> - <table border='0' cellpadding='5'> - - <tr valign='top'> - <td class='attr-rw'> - [RW] - </td> - <td class='attr-name'>create_id</td> - <td class='attr-desc'><p>This is create identifier, which is used to decide if the -<em>json_create</em> hook of a class should be called. It defaults to -‘json_class’.</p></td> - </tr> - - <tr valign='top'> - <td class='attr-rw'> - [RW] - </td> - <td class='attr-name'>dump_default_options</td> - <td class='attr-desc'><p>The global default options for the <a -href="JSON.html#method-i-dump">#dump</a> method:</p> - -<pre>:max_nesting: false -:allow_nan: true -:quirks_mode: true</pre></td> - </tr> - - <tr valign='top'> - <td class='attr-rw'> - [R] - </td> - <td class='attr-name'>generator</td> - <td class='attr-desc'><p>Returns the <a href="JSON.html">JSON</a> generator module that is used by -<a href="JSON.html">JSON</a>. This is either <a -href="JSON/Ext/Generator.html">JSON::Ext::Generator</a> or <a -href="JSON/Pure/Generator.html">JSON::Pure::Generator</a>.</p></td> - </tr> - - <tr valign='top'> - <td class='attr-rw'> - [RW] - </td> - <td class='attr-name'>load_default_options</td> - <td class='attr-desc'><p>The global default options for the <a -href="JSON.html#method-i-load">#load</a> method:</p> - -<pre>:max_nesting: false -:allow_nan: true -:quirks_mode: true</pre></td> - </tr> - - <tr valign='top'> - <td class='attr-rw'> - [R] - </td> - <td class='attr-name'>parser</td> - <td class='attr-desc'><p>Returns the <a href="JSON.html">JSON</a> parser class that is used by <a -href="JSON.html">JSON</a>. This is either <a -href="JSON/Ext/Parser.html">JSON::Ext::Parser</a> or <a -href="JSON/Pure/Parser.html">JSON::Pure::Parser</a>.</p></td> - </tr> - - <tr valign='top'> - <td class='attr-rw'> - [RW] - </td> - <td class='attr-name'>state</td> - <td class='attr-desc'><p>Returns the <a href="JSON.html">JSON</a> generator state class that is used -by <a href="JSON.html">JSON</a>. This is either <a -href="JSON/Ext/Generator/State.html">JSON::Ext::Generator::State</a> or <a -href="JSON/Pure/Generator/State.html">JSON::Pure::Generator::State</a>.</p></td> - </tr> - - </table> - - - - <!-- Methods --> - - <div class="sectiontitle">Class Public methods</div> - - <div class="method"> - <div class="title method-title" id="method-c-5B-5D"> - - <a name="method-c-5B-5D"></a><b>[]</b>(object, opts = {}) - - </div> - - - <div class="description"> - <p>If <em>object</em> is string-like, parse the string and return the parsed -result as a Ruby data structure. Otherwise generate a <a -href="JSON.html">JSON</a> text from the Ruby data structure object and -return it.</p> - -<p>The <em>opts</em> argument is passed through to generate/parse -respectively. See generate and parse for their documentation.</p> - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-c-5B-5D_source')" id="l_method-c-5B-5D_source">show</a> - - </p> - <div id="method-c-5B-5D_source" class="dyn-source"> - <pre><span class="ruby-comment"># File lib/json/common.rb, line 11</span> -<span class="ruby-keyword">def</span> <span class="ruby-operator">[]</span>(<span class="ruby-keyword ruby-title">object</span>, <span class="ruby-identifier">opts</span> = {}) - <span class="ruby-keyword">if</span> <span class="ruby-identifier">object</span>.<span class="ruby-identifier">respond_to?</span> <span class="ruby-value">:to_str</span> - <span class="ruby-constant">JSON</span>.<span class="ruby-identifier">parse</span>(<span class="ruby-identifier">object</span>.<span class="ruby-identifier">to_str</span>, <span class="ruby-identifier">opts</span>) - <span class="ruby-keyword">else</span> - <span class="ruby-constant">JSON</span>.<span class="ruby-identifier">generate</span>(<span class="ruby-identifier">object</span>, <span class="ruby-identifier">opts</span>) - <span class="ruby-keyword">end</span> -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - - <div class="method"> - <div class="title method-title" id="method-c-const_defined_in-3F"> - - <a name="method-c-const_defined_in-3F"></a><b>const_defined_in?</b>(modul, constant) - - </div> - - - <div class="description"> - - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-c-const_defined_in-3F_source')" id="l_method-c-const_defined_in-3F_source">show</a> - - </p> - <div id="method-c-const_defined_in-3F_source" class="dyn-source"> - <pre><span class="ruby-comment"># File lib/json/common.rb, line 415</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">self</span>.<span class="ruby-identifier">const_defined_in?</span>(<span class="ruby-identifier">modul</span>, <span class="ruby-identifier">constant</span>) - <span class="ruby-identifier">modul</span>.<span class="ruby-identifier">const_defined?</span>(<span class="ruby-identifier">constant</span>) -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - - <div class="method"> - <div class="title method-title" id="method-c-iconv"> - - <a name="method-c-iconv"></a><b>iconv</b>(to, from, string) - - </div> - - - <div class="description"> - <p>Encodes string using Ruby’s <em>String.encode</em></p> - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-c-iconv_source')" id="l_method-c-iconv_source">show</a> - - </p> - <div id="method-c-iconv_source" class="dyn-source"> - <pre><span class="ruby-comment"># File lib/json/common.rb, line 403</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">self</span>.<span class="ruby-identifier">iconv</span>(<span class="ruby-identifier">to</span>, <span class="ruby-identifier">from</span>, <span class="ruby-identifier">string</span>) - <span class="ruby-identifier">string</span>.<span class="ruby-identifier">encode</span>(<span class="ruby-identifier">to</span>, <span class="ruby-identifier">from</span>) -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - - <div class="method"> - <div class="title method-title" id="method-c-restore"> - - <a name="method-c-restore"></a><b>restore</b>(source, proc = nil) - - </div> - - - <div class="description"> - - </div> - - - - - - </div> - - <div class="sectiontitle">Instance Public methods</div> - - <div class="method"> - <div class="title method-title" id="method-i-dump"> - - <a name="method-i-dump"></a><b>dump</b>(obj, anIO = nil, limit = nil) - - </div> - - - <div class="description"> - <p>Dumps <em>obj</em> as a <a href="JSON.html">JSON</a> string, i.e. calls -generate on the object and returns the result.</p> - -<p>If anIO (an IO-like object or an object that responds to the write method) -was given, the resulting <a href="JSON.html">JSON</a> is written to it.</p> - -<p>If the number of nested arrays or objects exceeds <em>limit</em>, an -ArgumentError exception is raised. This argument is similar (but not -exactly the same!) to the <em>limit</em> argument in Marshal.dump.</p> - -<p>The default options for the generator can be changed via the <a -href="JSON.html#attribute-c-dump_default_options">::dump_default_options</a> -method.</p> - -<p>This method is part of the implementation of the load/dump interface of -Marshal and YAML.</p> - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-dump_source')" id="l_method-i-dump_source">show</a> - - </p> - <div id="method-i-dump_source" class="dyn-source"> - <pre><span class="ruby-comment"># File lib/json/common.rb, line 370</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">dump</span>(<span class="ruby-identifier">obj</span>, <span class="ruby-identifier">anIO</span> = <span class="ruby-keyword">nil</span>, <span class="ruby-identifier">limit</span> = <span class="ruby-keyword">nil</span>) - <span class="ruby-keyword">if</span> <span class="ruby-identifier">anIO</span> <span class="ruby-keyword">and</span> <span class="ruby-identifier">limit</span>.<span class="ruby-identifier">nil?</span> - <span class="ruby-identifier">anIO</span> = <span class="ruby-identifier">anIO</span>.<span class="ruby-identifier">to_io</span> <span class="ruby-keyword">if</span> <span class="ruby-identifier">anIO</span>.<span class="ruby-identifier">respond_to?</span>(<span class="ruby-value">:to_io</span>) - <span class="ruby-keyword">unless</span> <span class="ruby-identifier">anIO</span>.<span class="ruby-identifier">respond_to?</span>(<span class="ruby-value">:write</span>) - <span class="ruby-identifier">limit</span> = <span class="ruby-identifier">anIO</span> - <span class="ruby-identifier">anIO</span> = <span class="ruby-keyword">nil</span> - <span class="ruby-keyword">end</span> - <span class="ruby-keyword">end</span> - <span class="ruby-identifier">opts</span> = <span class="ruby-constant">JSON</span>.<span class="ruby-identifier">dump_default_options</span> - <span class="ruby-identifier">limit</span> <span class="ruby-keyword">and</span> <span class="ruby-identifier">opts</span>.<span class="ruby-identifier">update</span>(<span class="ruby-value">:max_nesting</span> =<span class="ruby-operator">></span> <span class="ruby-identifier">limit</span>) - <span class="ruby-identifier">result</span> = <span class="ruby-identifier">generate</span>(<span class="ruby-identifier">obj</span>, <span class="ruby-identifier">opts</span>) - <span class="ruby-keyword">if</span> <span class="ruby-identifier">anIO</span> - <span class="ruby-identifier">anIO</span>.<span class="ruby-identifier">write</span> <span class="ruby-identifier">result</span> - <span class="ruby-identifier">anIO</span> - <span class="ruby-keyword">else</span> - <span class="ruby-identifier">result</span> - <span class="ruby-keyword">end</span> -<span class="ruby-keyword">rescue</span> <span class="ruby-constant">JSON</span><span class="ruby-operator">::</span><span class="ruby-constant">NestingError</span> - <span class="ruby-identifier">raise</span> <span class="ruby-constant">ArgumentError</span>, <span class="ruby-string">"exceed depth limit"</span> -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - - <div class="method"> - <div class="title method-title" id="method-i-fast_generate"> - - <a name="method-i-fast_generate"></a><b>fast_generate</b>(obj, opts = nil) - - </div> - - - <div class="description"> - <p>Generate a <a href="JSON.html">JSON</a> document from the Ruby data -structure <em>obj</em> and return it. This method disables the checks for -circles in Ruby objects.</p> - -<p><strong>WARNING</strong>: Be careful not to pass any Ruby data structures -with circles as <em>obj</em> argument because this will cause <a -href="JSON.html">JSON</a> to go into an infinite loop.</p> - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-fast_generate_source')" id="l_method-i-fast_generate_source">show</a> - - </p> - <div id="method-i-fast_generate_source" class="dyn-source"> - <pre><span class="ruby-comment"># File lib/json/common.rb, line 231</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">fast_generate</span>(<span class="ruby-identifier">obj</span>, <span class="ruby-identifier">opts</span> = <span class="ruby-keyword">nil</span>) - <span class="ruby-keyword">if</span> <span class="ruby-constant">State</span> <span class="ruby-operator">===</span> <span class="ruby-identifier">opts</span> - <span class="ruby-identifier">state</span>, <span class="ruby-identifier">opts</span> = <span class="ruby-identifier">opts</span>, <span class="ruby-keyword">nil</span> - <span class="ruby-keyword">else</span> - <span class="ruby-identifier">state</span> = <span class="ruby-constant">FAST_STATE_PROTOTYPE</span>.<span class="ruby-identifier">dup</span> - <span class="ruby-keyword">end</span> - <span class="ruby-keyword">if</span> <span class="ruby-identifier">opts</span> - <span class="ruby-keyword">if</span> <span class="ruby-identifier">opts</span>.<span class="ruby-identifier">respond_to?</span> <span class="ruby-value">:to_hash</span> - <span class="ruby-identifier">opts</span> = <span class="ruby-identifier">opts</span>.<span class="ruby-identifier">to_hash</span> - <span class="ruby-keyword">elsif</span> <span class="ruby-identifier">opts</span>.<span class="ruby-identifier">respond_to?</span> <span class="ruby-value">:to_h</span> - <span class="ruby-identifier">opts</span> = <span class="ruby-identifier">opts</span>.<span class="ruby-identifier">to_h</span> - <span class="ruby-keyword">else</span> - <span class="ruby-identifier">raise</span> <span class="ruby-constant">TypeError</span>, <span class="ruby-node">"can't convert #{opts.class} into Hash"</span> - <span class="ruby-keyword">end</span> - <span class="ruby-identifier">state</span>.<span class="ruby-identifier">configure</span>(<span class="ruby-identifier">opts</span>) - <span class="ruby-keyword">end</span> - <span class="ruby-identifier">state</span>.<span class="ruby-identifier">generate</span>(<span class="ruby-identifier">obj</span>) -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - - <div class="method"> - <div class="title method-title" id="method-i-generate"> - - <a name="method-i-generate"></a><b>generate</b>(obj, opts = nil) - - </div> - - - <div class="description"> - <p>Generate a <a href="JSON.html">JSON</a> document from the Ruby data -structure <em>obj</em> and return it. <em>state</em> is * a JSON::State -object,</p> -<ul><li> -<p>or a Hash like object (responding to to_hash),</p> -</li><li> -<p>an object convertible into a hash by a to_h method,</p> -</li></ul> - -<p>that is used as or to configure a State object.</p> - -<p>It defaults to a state object, that creates the shortest possible <a -href="JSON.html">JSON</a> text in one line, checks for circular data -structures and doesn’t allow <a href="JSON.html#NaN">NaN</a>, <a -href="JSON.html#Infinity">Infinity</a>, and -<a -href="JSON.html#Infinity">Infinity</a>.</p> - -<p>A <em>state</em> hash can have the following keys:</p> -<ul><li> -<p><strong>indent</strong>: a string used to indent levels (default: "),</p> -</li><li> -<p><strong>space</strong>: a string that is put after, a : or , delimiter -(default: "),</p> -</li><li> -<p><strong>space_before</strong>: a string that is put before a : pair -delimiter (default: "),</p> -</li><li> -<p><strong>object_nl</strong>: a string that is put at the end of a <a -href="JSON.html">JSON</a> object (default: "),</p> -</li><li> -<p><strong>array_nl</strong>: a string that is put at the end of a <a -href="JSON.html">JSON</a> array (default: "),</p> -</li><li> -<p><strong>allow_nan</strong>: true if <a href="JSON.html#NaN">NaN</a>, <a -href="JSON.html#Infinity">Infinity</a>, and -<a -href="JSON.html#Infinity">Infinity</a> should be generated, otherwise an -exception is thrown if these values are encountered. This options defaults -to false.</p> -</li><li> -<p><strong>max_nesting</strong>: The maximum depth of nesting allowed in the -data structures from which <a href="JSON.html">JSON</a> is to be generated. -Disable depth checking with :max_nesting => false, it defaults to 19.</p> -</li></ul> - -<p>See also the <a href="JSON.html#method-i-fast_generate">#fast_generate</a> -for the fastest creation method with the least amount of sanity checks, and -the <a href="JSON.html#method-i-pretty_generate">#pretty_generate</a> -method for some defaults for pretty output.</p> - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-generate_source')" id="l_method-i-generate_source">show</a> - - </p> - <div id="method-i-generate_source" class="dyn-source"> - <pre><span class="ruby-comment"># File lib/json/common.rb, line 200</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">generate</span>(<span class="ruby-identifier">obj</span>, <span class="ruby-identifier">opts</span> = <span class="ruby-keyword">nil</span>) - <span class="ruby-keyword">if</span> <span class="ruby-constant">State</span> <span class="ruby-operator">===</span> <span class="ruby-identifier">opts</span> - <span class="ruby-identifier">state</span>, <span class="ruby-identifier">opts</span> = <span class="ruby-identifier">opts</span>, <span class="ruby-keyword">nil</span> - <span class="ruby-keyword">else</span> - <span class="ruby-identifier">state</span> = <span class="ruby-constant">SAFE_STATE_PROTOTYPE</span>.<span class="ruby-identifier">dup</span> - <span class="ruby-keyword">end</span> - <span class="ruby-keyword">if</span> <span class="ruby-identifier">opts</span> - <span class="ruby-keyword">if</span> <span class="ruby-identifier">opts</span>.<span class="ruby-identifier">respond_to?</span> <span class="ruby-value">:to_hash</span> - <span class="ruby-identifier">opts</span> = <span class="ruby-identifier">opts</span>.<span class="ruby-identifier">to_hash</span> - <span class="ruby-keyword">elsif</span> <span class="ruby-identifier">opts</span>.<span class="ruby-identifier">respond_to?</span> <span class="ruby-value">:to_h</span> - <span class="ruby-identifier">opts</span> = <span class="ruby-identifier">opts</span>.<span class="ruby-identifier">to_h</span> - <span class="ruby-keyword">else</span> - <span class="ruby-identifier">raise</span> <span class="ruby-constant">TypeError</span>, <span class="ruby-node">"can't convert #{opts.class} into Hash"</span> - <span class="ruby-keyword">end</span> - <span class="ruby-identifier">state</span> = <span class="ruby-identifier">state</span>.<span class="ruby-identifier">configure</span>(<span class="ruby-identifier">opts</span>) - <span class="ruby-keyword">end</span> - <span class="ruby-identifier">state</span>.<span class="ruby-identifier">generate</span>(<span class="ruby-identifier">obj</span>) -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - - <div class="method"> - <div class="title method-title" id="method-i-load"> - - <a name="method-i-load"></a><b>load</b>(source, proc = nil) - - </div> - - - <div class="description"> - <p>Load a ruby data structure from a <a href="JSON.html">JSON</a> -<em>source</em> and return it. A source can either be a string-like object, -an IO-like object, or an object responding to the read method. If -<em>proc</em> was given, it will be called with any nested Ruby object as -an argument recursively in depth first order. The default options for the -parser can be changed via the <a -href="JSON.html#attribute-c-load_default_options">::load_default_options</a> -method.</p> - -<p>This method is part of the implementation of the load/dump interface of -Marshal and YAML.</p> - </div> - - - - <div class="aka"> - Also aliased as: <a href="JSON.html#method-i-restore">restore</a> - </div> - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-load_source')" id="l_method-i-load_source">show</a> - - </p> - <div id="method-i-load_source" class="dyn-source"> - <pre><span class="ruby-comment"># File lib/json/common.rb, line 308</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">load</span>(<span class="ruby-identifier">source</span>, <span class="ruby-identifier">proc</span> = <span class="ruby-keyword">nil</span>) - <span class="ruby-identifier">opts</span> = <span class="ruby-identifier">load_default_options</span> - <span class="ruby-keyword">if</span> <span class="ruby-identifier">source</span>.<span class="ruby-identifier">respond_to?</span> <span class="ruby-value">:to_str</span> - <span class="ruby-identifier">source</span> = <span class="ruby-identifier">source</span>.<span class="ruby-identifier">to_str</span> - <span class="ruby-keyword">elsif</span> <span class="ruby-identifier">source</span>.<span class="ruby-identifier">respond_to?</span> <span class="ruby-value">:to_io</span> - <span class="ruby-identifier">source</span> = <span class="ruby-identifier">source</span>.<span class="ruby-identifier">to_io</span>.<span class="ruby-identifier">read</span> - <span class="ruby-keyword">elsif</span> <span class="ruby-identifier">source</span>.<span class="ruby-identifier">respond_to?</span>(<span class="ruby-value">:read</span>) - <span class="ruby-identifier">source</span> = <span class="ruby-identifier">source</span>.<span class="ruby-identifier">read</span> - <span class="ruby-keyword">end</span> - <span class="ruby-keyword">if</span> <span class="ruby-identifier">opts</span>[<span class="ruby-value">:quirks_mode</span>] <span class="ruby-operator">&&</span> (<span class="ruby-identifier">source</span>.<span class="ruby-identifier">nil?</span> <span class="ruby-operator">||</span> <span class="ruby-identifier">source</span>.<span class="ruby-identifier">empty?</span>) - <span class="ruby-identifier">source</span> = <span class="ruby-string">'null'</span> - <span class="ruby-keyword">end</span> - <span class="ruby-identifier">result</span> = <span class="ruby-identifier">parse</span>(<span class="ruby-identifier">source</span>, <span class="ruby-identifier">opts</span>) - <span class="ruby-identifier">recurse_proc</span>(<span class="ruby-identifier">result</span>, &<span class="ruby-identifier">proc</span>) <span class="ruby-keyword">if</span> <span class="ruby-identifier">proc</span> - <span class="ruby-identifier">result</span> -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - - <div class="method"> - <div class="title method-title" id="method-i-parse"> - - <a name="method-i-parse"></a><b>parse</b>(source, opts = {}) - - </div> - - - <div class="description"> - <p>Parse the <a href="JSON.html">JSON</a> document <em>source</em> into a Ruby -data structure and return it.</p> - -<p><em>opts</em> can have the following keys:</p> -<ul><li> -<p><strong>max_nesting</strong>: The maximum depth of nesting allowed in the -parsed data structures. Disable depth checking with :max_nesting => -false. It defaults to 19.</p> -</li><li> -<p><strong>allow_nan</strong>: If set to true, allow <a -href="JSON.html#NaN">NaN</a>, <a href="JSON.html#Infinity">Infinity</a> and --<a href="JSON.html#Infinity">Infinity</a> in defiance of RFC 4627 to be -parsed by the Parser. This option defaults to false.</p> -</li><li> -<p><strong>symbolize_names</strong>: If set to true, returns symbols for the -names (keys) in a <a href="JSON.html">JSON</a> object. Otherwise strings -are returned. Strings are the default.</p> -</li><li> -<p><strong>create_additions</strong>: If set to false, the Parser doesn't -create additions even if a matching class and <a -href="JSON.html#attribute-c-create_id">::create_id</a> was found. This -option defaults to true.</p> -</li><li> -<p><strong>object_class</strong>: Defaults to Hash</p> -</li><li> -<p><strong>array_class</strong>: Defaults to Array</p> -</li></ul> - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-parse_source')" id="l_method-i-parse_source">show</a> - - </p> - <div id="method-i-parse_source" class="dyn-source"> - <pre><span class="ruby-comment"># File lib/json/common.rb, line 147</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">parse</span>(<span class="ruby-identifier">source</span>, <span class="ruby-identifier">opts</span> = {}) - <span class="ruby-constant">Parser</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">source</span>, <span class="ruby-identifier">opts</span>).<span class="ruby-identifier">parse</span> -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - - <div class="method"> - <div class="title method-title" id="method-i-parse-21"> - - <a name="method-i-parse-21"></a><b>parse!</b>(source, opts = {}) - - </div> - - - <div class="description"> - <p>Parse the <a href="JSON.html">JSON</a> document <em>source</em> into a Ruby -data structure and return it. The bang version of the parse method defaults -to the more dangerous values for the <em>opts</em> hash, so be sure only to -parse trusted <em>source</em> documents.</p> - -<p><em>opts</em> can have the following keys:</p> -<ul><li> -<p><strong>max_nesting</strong>: The maximum depth of nesting allowed in the -parsed data structures. Enable depth checking with :max_nesting => -anInteger. The parse! methods defaults to not doing max depth checking: -This can be dangerous if someone wants to fill up your stack.</p> -</li><li> -<p><strong>allow_nan</strong>: If set to true, allow <a -href="JSON.html#NaN">NaN</a>, <a href="JSON.html#Infinity">Infinity</a>, -and -<a href="JSON.html#Infinity">Infinity</a> in defiance of RFC 4627 to -be parsed by the Parser. This option defaults to true.</p> -</li><li> -<p><strong>create_additions</strong>: If set to false, the Parser doesn't -create additions even if a matching class and <a -href="JSON.html#attribute-c-create_id">::create_id</a> was found. This -option defaults to true.</p> -</li></ul> - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-parse-21_source')" id="l_method-i-parse-21_source">show</a> - - </p> - <div id="method-i-parse-21_source" class="dyn-source"> - <pre><span class="ruby-comment"># File lib/json/common.rb, line 166</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">parse!</span>(<span class="ruby-identifier">source</span>, <span class="ruby-identifier">opts</span> = {}) - <span class="ruby-identifier">opts</span> = { - <span class="ruby-value">:max_nesting</span> =<span class="ruby-operator">></span> <span class="ruby-keyword">false</span>, - <span class="ruby-value">:allow_nan</span> =<span class="ruby-operator">></span> <span class="ruby-keyword">true</span> - }.<span class="ruby-identifier">update</span>(<span class="ruby-identifier">opts</span>) - <span class="ruby-constant">Parser</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">source</span>, <span class="ruby-identifier">opts</span>).<span class="ruby-identifier">parse</span> -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - - <div class="method"> - <div class="title method-title" id="method-i-pretty_generate"> - - <a name="method-i-pretty_generate"></a><b>pretty_generate</b>(obj, opts = nil) - - </div> - - - <div class="description"> - <p>Generate a <a href="JSON.html">JSON</a> document from the Ruby data -structure <em>obj</em> and return it. The returned document is a prettier -form of the document returned by unparse.</p> - -<p>The <em>opts</em> argument can be used to configure the generator. See the -generate method for a more detailed explanation.</p> - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-pretty_generate_source')" id="l_method-i-pretty_generate_source">show</a> - - </p> - <div id="method-i-pretty_generate_source" class="dyn-source"> - <pre><span class="ruby-comment"># File lib/json/common.rb, line 262</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">pretty_generate</span>(<span class="ruby-identifier">obj</span>, <span class="ruby-identifier">opts</span> = <span class="ruby-keyword">nil</span>) - <span class="ruby-keyword">if</span> <span class="ruby-constant">State</span> <span class="ruby-operator">===</span> <span class="ruby-identifier">opts</span> - <span class="ruby-identifier">state</span>, <span class="ruby-identifier">opts</span> = <span class="ruby-identifier">opts</span>, <span class="ruby-keyword">nil</span> - <span class="ruby-keyword">else</span> - <span class="ruby-identifier">state</span> = <span class="ruby-constant">PRETTY_STATE_PROTOTYPE</span>.<span class="ruby-identifier">dup</span> - <span class="ruby-keyword">end</span> - <span class="ruby-keyword">if</span> <span class="ruby-identifier">opts</span> - <span class="ruby-keyword">if</span> <span class="ruby-identifier">opts</span>.<span class="ruby-identifier">respond_to?</span> <span class="ruby-value">:to_hash</span> - <span class="ruby-identifier">opts</span> = <span class="ruby-identifier">opts</span>.<span class="ruby-identifier">to_hash</span> - <span class="ruby-keyword">elsif</span> <span class="ruby-identifier">opts</span>.<span class="ruby-identifier">respond_to?</span> <span class="ruby-value">:to_h</span> - <span class="ruby-identifier">opts</span> = <span class="ruby-identifier">opts</span>.<span class="ruby-identifier">to_h</span> - <span class="ruby-keyword">else</span> - <span class="ruby-identifier">raise</span> <span class="ruby-constant">TypeError</span>, <span class="ruby-node">"can't convert #{opts.class} into Hash"</span> - <span class="ruby-keyword">end</span> - <span class="ruby-identifier">state</span>.<span class="ruby-identifier">configure</span>(<span class="ruby-identifier">opts</span>) - <span class="ruby-keyword">end</span> - <span class="ruby-identifier">state</span>.<span class="ruby-identifier">generate</span>(<span class="ruby-identifier">obj</span>) -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - - <div class="method"> - <div class="title method-title" id="method-i-recurse_proc"> - - <a name="method-i-recurse_proc"></a><b>recurse_proc</b>(result, &proc) - - </div> - - - <div class="description"> - <p>Recursively calls passed <em>Proc</em> if the parsed data structure is an -<em>Array</em> or <em>Hash</em></p> - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-recurse_proc_source')" id="l_method-i-recurse_proc_source">show</a> - - </p> - <div id="method-i-recurse_proc_source" class="dyn-source"> - <pre><span class="ruby-comment"># File lib/json/common.rb, line 326</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">recurse_proc</span>(<span class="ruby-identifier">result</span>, &<span class="ruby-identifier">proc</span>) - <span class="ruby-keyword">case</span> <span class="ruby-identifier">result</span> - <span class="ruby-keyword">when</span> <span class="ruby-constant">Array</span> - <span class="ruby-identifier">result</span>.<span class="ruby-identifier">each</span> { <span class="ruby-operator">|</span><span class="ruby-identifier">x</span><span class="ruby-operator">|</span> <span class="ruby-identifier">recurse_proc</span> <span class="ruby-identifier">x</span>, &<span class="ruby-identifier">proc</span> } - <span class="ruby-identifier">proc</span>.<span class="ruby-identifier">call</span> <span class="ruby-identifier">result</span> - <span class="ruby-keyword">when</span> <span class="ruby-constant">Hash</span> - <span class="ruby-identifier">result</span>.<span class="ruby-identifier">each</span> { <span class="ruby-operator">|</span><span class="ruby-identifier">x</span>, <span class="ruby-identifier">y</span><span class="ruby-operator">|</span> <span class="ruby-identifier">recurse_proc</span> <span class="ruby-identifier">x</span>, &<span class="ruby-identifier">proc</span>; <span class="ruby-identifier">recurse_proc</span> <span class="ruby-identifier">y</span>, &<span class="ruby-identifier">proc</span> } - <span class="ruby-identifier">proc</span>.<span class="ruby-identifier">call</span> <span class="ruby-identifier">result</span> - <span class="ruby-keyword">else</span> - <span class="ruby-identifier">proc</span>.<span class="ruby-identifier">call</span> <span class="ruby-identifier">result</span> - <span class="ruby-keyword">end</span> -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - </div> - </div> - </body> -</html>
\ No newline at end of file diff --git a/doc/classes/JSON/CircularDatastructure.html b/doc/classes/JSON/CircularDatastructure.html deleted file mode 100644 index a57cddd..0000000 --- a/doc/classes/JSON/CircularDatastructure.html +++ /dev/null @@ -1,75 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" - "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> -<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> -<head> - <title>JSON::CircularDatastructure</title> - <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> - <link rel="stylesheet" href="../../css/reset.css" type="text/css" media="screen" /> -<link rel="stylesheet" href="../../css/main.css" type="text/css" media="screen" /> -<link rel="stylesheet" href="../../css/github.css" type="text/css" media="screen" /> -<script src="../../js/jquery-1.3.2.min.js" type="text/javascript" charset="utf-8"></script> -<script src="../../js/jquery-effect.js" type="text/javascript" charset="utf-8"></script> -<script src="../../js/main.js" type="text/javascript" charset="utf-8"></script> -<script src="../../js/highlight.pack.js" type="text/javascript" charset="utf-8"></script> - -</head> - -<body> - <div class="banner"> - - <h1> - <span class="type">Class</span> - JSON::CircularDatastructure - - <span class="parent">< - - <a href="NestingError.html">JSON::NestingError</a> - - </span> - - </h1> - <ul class="files"> - - <li><a href="../../files/lib/json/common_rb.html">lib/json/common.rb</a></li> - - </ul> - </div> - <div id="bodyContent"> - <div id="content"> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - <!-- Methods --> - </div> - </div> - </body> -</html>
\ No newline at end of file diff --git a/doc/classes/JSON/Ext.html b/doc/classes/JSON/Ext.html deleted file mode 100644 index cda13e9..0000000 --- a/doc/classes/JSON/Ext.html +++ /dev/null @@ -1,94 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" - "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> -<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> -<head> - <title>JSON::Ext</title> - <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> - <link rel="stylesheet" href="../../css/reset.css" type="text/css" media="screen" /> -<link rel="stylesheet" href="../../css/main.css" type="text/css" media="screen" /> -<link rel="stylesheet" href="../../css/github.css" type="text/css" media="screen" /> -<script src="../../js/jquery-1.3.2.min.js" type="text/javascript" charset="utf-8"></script> -<script src="../../js/jquery-effect.js" type="text/javascript" charset="utf-8"></script> -<script src="../../js/main.js" type="text/javascript" charset="utf-8"></script> -<script src="../../js/highlight.pack.js" type="text/javascript" charset="utf-8"></script> - -</head> - -<body> - <div class="banner"> - - <h1> - <span class="type">Module</span> - JSON::Ext - - </h1> - <ul class="files"> - - <li><a href="../../files/lib/json/ext_rb.html">lib/json/ext.rb</a></li> - - <li><a href="../../files/ext/json/ext/parser/parser_c.html">ext/json/ext/parser/parser.c</a></li> - - </ul> - </div> - <div id="bodyContent"> - <div id="content"> - - <div class="description"> - -<p>This module holds all the modules/classes that implement JSON’s -functionality as C extensions.</p> - - </div> - - - - - - - - - - - - <!-- Namespace --> - <div class="sectiontitle">Namespace</div> - <ul> - - <li> - <span class="type">MODULE</span> - <a href="Ext/Generator.html">JSON::Ext::Generator</a> - </li> - - <li> - <span class="type">CLASS</span> - <a href="Ext/Parser.html">JSON::Ext::Parser</a> - </li> - - </ul> - - - - - - - - - - - - - - - - - - - - - - <!-- Methods --> - </div> - </div> - </body> -</html>
\ No newline at end of file diff --git a/doc/classes/JSON/Ext/Generator.html b/doc/classes/JSON/Ext/Generator.html deleted file mode 100644 index cdff971..0000000 --- a/doc/classes/JSON/Ext/Generator.html +++ /dev/null @@ -1,96 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" - "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> -<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> -<head> - <title>JSON::Ext::Generator</title> - <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> - <link rel="stylesheet" href="../../../css/reset.css" type="text/css" media="screen" /> -<link rel="stylesheet" href="../../../css/main.css" type="text/css" media="screen" /> -<link rel="stylesheet" href="../../../css/github.css" type="text/css" media="screen" /> -<script src="../../../js/jquery-1.3.2.min.js" type="text/javascript" charset="utf-8"></script> -<script src="../../../js/jquery-effect.js" type="text/javascript" charset="utf-8"></script> -<script src="../../../js/main.js" type="text/javascript" charset="utf-8"></script> -<script src="../../../js/highlight.pack.js" type="text/javascript" charset="utf-8"></script> - -</head> - -<body> - <div class="banner"> - - <h1> - <span class="type">Module</span> - JSON::Ext::Generator - - </h1> - <ul class="files"> - - <li><a href="../../../files/ext/json/ext/parser/parser_c.html">ext/json/ext/parser/parser.c</a></li> - - </ul> - </div> - <div id="bodyContent"> - <div id="content"> - - <div class="description"> - -<p>This is the <a href="../../JSON.html">JSON</a> generator implemented as a C -extension. It can be configured to be used by setting</p> - -<pre>JSON.generator = JSON::Ext::Generator</pre> - -<p>with the method generator= in <a href="../../JSON.html">JSON</a>.</p> - - </div> - - - - - - - - - - - - <!-- Namespace --> - <div class="sectiontitle">Namespace</div> - <ul> - - <li> - <span class="type">MODULE</span> - <a href="Generator/GeneratorMethods.html">JSON::Ext::Generator::GeneratorMethods</a> - </li> - - <li> - <span class="type">CLASS</span> - <a href="Generator/State.html">JSON::Ext::Generator::State</a> - </li> - - </ul> - - - - - - - - - - - - - - - - - - - - - - <!-- Methods --> - </div> - </div> - </body> -</html>
\ No newline at end of file diff --git a/doc/classes/JSON/Ext/Generator/GeneratorMethods.html b/doc/classes/JSON/Ext/Generator/GeneratorMethods.html deleted file mode 100644 index a228ad2..0000000 --- a/doc/classes/JSON/Ext/Generator/GeneratorMethods.html +++ /dev/null @@ -1,125 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" - "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> -<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> -<head> - <title>JSON::Ext::Generator::GeneratorMethods</title> - <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> - <link rel="stylesheet" href="../../../../css/reset.css" type="text/css" media="screen" /> -<link rel="stylesheet" href="../../../../css/main.css" type="text/css" media="screen" /> -<link rel="stylesheet" href="../../../../css/github.css" type="text/css" media="screen" /> -<script src="../../../../js/jquery-1.3.2.min.js" type="text/javascript" charset="utf-8"></script> -<script src="../../../../js/jquery-effect.js" type="text/javascript" charset="utf-8"></script> -<script src="../../../../js/main.js" type="text/javascript" charset="utf-8"></script> -<script src="../../../../js/highlight.pack.js" type="text/javascript" charset="utf-8"></script> - -</head> - -<body> - <div class="banner"> - - <h1> - <span class="type">Module</span> - JSON::Ext::Generator::GeneratorMethods - - </h1> - <ul class="files"> - - <li><a href="../../../../files/ext/json/ext/generator/generator_c.html">ext/json/ext/generator/generator.c</a></li> - - </ul> - </div> - <div id="bodyContent"> - <div id="content"> - - - - - - - - - - - - <!-- Namespace --> - <div class="sectiontitle">Namespace</div> - <ul> - - <li> - <span class="type">MODULE</span> - <a href="GeneratorMethods/Array.html">JSON::Ext::Generator::GeneratorMethods::Array</a> - </li> - - <li> - <span class="type">MODULE</span> - <a href="GeneratorMethods/Bignum.html">JSON::Ext::Generator::GeneratorMethods::Bignum</a> - </li> - - <li> - <span class="type">MODULE</span> - <a href="GeneratorMethods/FalseClass.html">JSON::Ext::Generator::GeneratorMethods::FalseClass</a> - </li> - - <li> - <span class="type">MODULE</span> - <a href="GeneratorMethods/Fixnum.html">JSON::Ext::Generator::GeneratorMethods::Fixnum</a> - </li> - - <li> - <span class="type">MODULE</span> - <a href="GeneratorMethods/Float.html">JSON::Ext::Generator::GeneratorMethods::Float</a> - </li> - - <li> - <span class="type">MODULE</span> - <a href="GeneratorMethods/Hash.html">JSON::Ext::Generator::GeneratorMethods::Hash</a> - </li> - - <li> - <span class="type">MODULE</span> - <a href="GeneratorMethods/NilClass.html">JSON::Ext::Generator::GeneratorMethods::NilClass</a> - </li> - - <li> - <span class="type">MODULE</span> - <a href="GeneratorMethods/Object.html">JSON::Ext::Generator::GeneratorMethods::Object</a> - </li> - - <li> - <span class="type">MODULE</span> - <a href="GeneratorMethods/String.html">JSON::Ext::Generator::GeneratorMethods::String</a> - </li> - - <li> - <span class="type">MODULE</span> - <a href="GeneratorMethods/TrueClass.html">JSON::Ext::Generator::GeneratorMethods::TrueClass</a> - </li> - - </ul> - - - - - - - - - - - - - - - - - - - - - - <!-- Methods --> - </div> - </div> - </body> -</html>
\ No newline at end of file diff --git a/doc/classes/JSON/Ext/Generator/GeneratorMethods/Array.html b/doc/classes/JSON/Ext/Generator/GeneratorMethods/Array.html deleted file mode 100644 index e98d4fe..0000000 --- a/doc/classes/JSON/Ext/Generator/GeneratorMethods/Array.html +++ /dev/null @@ -1,127 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" - "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> -<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> -<head> - <title>JSON::Ext::Generator::GeneratorMethods::Array</title> - <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> - <link rel="stylesheet" href="../../../../../css/reset.css" type="text/css" media="screen" /> -<link rel="stylesheet" href="../../../../../css/main.css" type="text/css" media="screen" /> -<link rel="stylesheet" href="../../../../../css/github.css" type="text/css" media="screen" /> -<script src="../../../../../js/jquery-1.3.2.min.js" type="text/javascript" charset="utf-8"></script> -<script src="../../../../../js/jquery-effect.js" type="text/javascript" charset="utf-8"></script> -<script src="../../../../../js/main.js" type="text/javascript" charset="utf-8"></script> -<script src="../../../../../js/highlight.pack.js" type="text/javascript" charset="utf-8"></script> - -</head> - -<body> - <div class="banner"> - - <h1> - <span class="type">Module</span> - JSON::Ext::Generator::GeneratorMethods::Array - - </h1> - <ul class="files"> - - <li><a href="../../../../../files/ext/json/ext/generator/generator_c.html">ext/json/ext/generator/generator.c</a></li> - - </ul> - </div> - <div id="bodyContent"> - <div id="content"> - - - - - - - - - - - - - - - <!-- Method ref --> - <div class="sectiontitle">Methods</div> - <dl class="methods"> - - <dt>T</dt> - <dd> - <ul> - - - <li> - <a href="#method-i-to_json">to_json</a> - </li> - - </ul> - </dd> - - </dl> - - - - - - - - - - - - - - - - - - - <!-- Methods --> - - <div class="sectiontitle">Instance Public methods</div> - - <div class="method"> - <div class="title method-title" id="method-i-to_json"> - - <a name="method-i-to_json"></a><b>to_json(state = nil) -</b> - - </div> - - - <div class="description"> - <p>Returns a <a href="../../../../JSON.html">JSON</a> string containing a <a -href="../../../../JSON.html">JSON</a> array, that is generated from this <a -href="Array.html">Array</a> instance. <em>state</em> is a JSON::State -object, that can also be used to configure the produced <a -href="../../../../JSON.html">JSON</a> string output further.</p> - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-to_json_source')" id="l_method-i-to_json_source">show</a> - - </p> - <div id="method-i-to_json_source" class="dyn-source"> - <pre>static VALUE mArray_to_json(int argc, VALUE *argv, VALUE self) { - GENERATE_JSON(array); -}</pre> - </div> - </div> - - </div> - </div> - </div> - </body> -</html>
\ No newline at end of file diff --git a/doc/classes/JSON/Ext/Generator/GeneratorMethods/Bignum.html b/doc/classes/JSON/Ext/Generator/GeneratorMethods/Bignum.html deleted file mode 100644 index 32860f5..0000000 --- a/doc/classes/JSON/Ext/Generator/GeneratorMethods/Bignum.html +++ /dev/null @@ -1,125 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" - "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> -<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> -<head> - <title>JSON::Ext::Generator::GeneratorMethods::Bignum</title> - <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> - <link rel="stylesheet" href="../../../../../css/reset.css" type="text/css" media="screen" /> -<link rel="stylesheet" href="../../../../../css/main.css" type="text/css" media="screen" /> -<link rel="stylesheet" href="../../../../../css/github.css" type="text/css" media="screen" /> -<script src="../../../../../js/jquery-1.3.2.min.js" type="text/javascript" charset="utf-8"></script> -<script src="../../../../../js/jquery-effect.js" type="text/javascript" charset="utf-8"></script> -<script src="../../../../../js/main.js" type="text/javascript" charset="utf-8"></script> -<script src="../../../../../js/highlight.pack.js" type="text/javascript" charset="utf-8"></script> - -</head> - -<body> - <div class="banner"> - - <h1> - <span class="type">Module</span> - JSON::Ext::Generator::GeneratorMethods::Bignum - - </h1> - <ul class="files"> - - <li><a href="../../../../../files/ext/json/ext/generator/generator_c.html">ext/json/ext/generator/generator.c</a></li> - - </ul> - </div> - <div id="bodyContent"> - <div id="content"> - - - - - - - - - - - - - - - <!-- Method ref --> - <div class="sectiontitle">Methods</div> - <dl class="methods"> - - <dt>T</dt> - <dd> - <ul> - - - <li> - <a href="#method-i-to_json">to_json</a> - </li> - - </ul> - </dd> - - </dl> - - - - - - - - - - - - - - - - - - - <!-- Methods --> - - <div class="sectiontitle">Instance Public methods</div> - - <div class="method"> - <div class="title method-title" id="method-i-to_json"> - - <a name="method-i-to_json"></a><b>to_json(*) -</b> - - </div> - - - <div class="description"> - <p>Returns a <a href="../../../../JSON.html">JSON</a> string representation -for this Integer number.</p> - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-to_json_source')" id="l_method-i-to_json_source">show</a> - - </p> - <div id="method-i-to_json_source" class="dyn-source"> - <pre>static VALUE mBignum_to_json(int argc, VALUE *argv, VALUE self) -{ - GENERATE_JSON(bignum); -}</pre> - </div> - </div> - - </div> - </div> - </div> - </body> -</html>
\ No newline at end of file diff --git a/doc/classes/JSON/Ext/Generator/GeneratorMethods/FalseClass.html b/doc/classes/JSON/Ext/Generator/GeneratorMethods/FalseClass.html deleted file mode 100644 index 331cde5..0000000 --- a/doc/classes/JSON/Ext/Generator/GeneratorMethods/FalseClass.html +++ /dev/null @@ -1,125 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" - "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> -<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> -<head> - <title>JSON::Ext::Generator::GeneratorMethods::FalseClass</title> - <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> - <link rel="stylesheet" href="../../../../../css/reset.css" type="text/css" media="screen" /> -<link rel="stylesheet" href="../../../../../css/main.css" type="text/css" media="screen" /> -<link rel="stylesheet" href="../../../../../css/github.css" type="text/css" media="screen" /> -<script src="../../../../../js/jquery-1.3.2.min.js" type="text/javascript" charset="utf-8"></script> -<script src="../../../../../js/jquery-effect.js" type="text/javascript" charset="utf-8"></script> -<script src="../../../../../js/main.js" type="text/javascript" charset="utf-8"></script> -<script src="../../../../../js/highlight.pack.js" type="text/javascript" charset="utf-8"></script> - -</head> - -<body> - <div class="banner"> - - <h1> - <span class="type">Module</span> - JSON::Ext::Generator::GeneratorMethods::FalseClass - - </h1> - <ul class="files"> - - <li><a href="../../../../../files/ext/json/ext/generator/generator_c.html">ext/json/ext/generator/generator.c</a></li> - - </ul> - </div> - <div id="bodyContent"> - <div id="content"> - - - - - - - - - - - - - - - <!-- Method ref --> - <div class="sectiontitle">Methods</div> - <dl class="methods"> - - <dt>T</dt> - <dd> - <ul> - - - <li> - <a href="#method-i-to_json">to_json</a> - </li> - - </ul> - </dd> - - </dl> - - - - - - - - - - - - - - - - - - - <!-- Methods --> - - <div class="sectiontitle">Instance Public methods</div> - - <div class="method"> - <div class="title method-title" id="method-i-to_json"> - - <a name="method-i-to_json"></a><b>to_json(*) -</b> - - </div> - - - <div class="description"> - <p>Returns a <a href="../../../../JSON.html">JSON</a> string for false: -‘false’.</p> - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-to_json_source')" id="l_method-i-to_json_source">show</a> - - </p> - <div id="method-i-to_json_source" class="dyn-source"> - <pre>static VALUE mFalseClass_to_json(int argc, VALUE *argv, VALUE self) -{ - GENERATE_JSON(false); -}</pre> - </div> - </div> - - </div> - </div> - </div> - </body> -</html>
\ No newline at end of file diff --git a/doc/classes/JSON/Ext/Generator/GeneratorMethods/Fixnum.html b/doc/classes/JSON/Ext/Generator/GeneratorMethods/Fixnum.html deleted file mode 100644 index 279cbb8..0000000 --- a/doc/classes/JSON/Ext/Generator/GeneratorMethods/Fixnum.html +++ /dev/null @@ -1,125 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" - "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> -<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> -<head> - <title>JSON::Ext::Generator::GeneratorMethods::Fixnum</title> - <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> - <link rel="stylesheet" href="../../../../../css/reset.css" type="text/css" media="screen" /> -<link rel="stylesheet" href="../../../../../css/main.css" type="text/css" media="screen" /> -<link rel="stylesheet" href="../../../../../css/github.css" type="text/css" media="screen" /> -<script src="../../../../../js/jquery-1.3.2.min.js" type="text/javascript" charset="utf-8"></script> -<script src="../../../../../js/jquery-effect.js" type="text/javascript" charset="utf-8"></script> -<script src="../../../../../js/main.js" type="text/javascript" charset="utf-8"></script> -<script src="../../../../../js/highlight.pack.js" type="text/javascript" charset="utf-8"></script> - -</head> - -<body> - <div class="banner"> - - <h1> - <span class="type">Module</span> - JSON::Ext::Generator::GeneratorMethods::Fixnum - - </h1> - <ul class="files"> - - <li><a href="../../../../../files/ext/json/ext/generator/generator_c.html">ext/json/ext/generator/generator.c</a></li> - - </ul> - </div> - <div id="bodyContent"> - <div id="content"> - - - - - - - - - - - - - - - <!-- Method ref --> - <div class="sectiontitle">Methods</div> - <dl class="methods"> - - <dt>T</dt> - <dd> - <ul> - - - <li> - <a href="#method-i-to_json">to_json</a> - </li> - - </ul> - </dd> - - </dl> - - - - - - - - - - - - - - - - - - - <!-- Methods --> - - <div class="sectiontitle">Instance Public methods</div> - - <div class="method"> - <div class="title method-title" id="method-i-to_json"> - - <a name="method-i-to_json"></a><b>to_json(*) -</b> - - </div> - - - <div class="description"> - <p>Returns a <a href="../../../../JSON.html">JSON</a> string representation -for this Integer number.</p> - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-to_json_source')" id="l_method-i-to_json_source">show</a> - - </p> - <div id="method-i-to_json_source" class="dyn-source"> - <pre>static VALUE mFixnum_to_json(int argc, VALUE *argv, VALUE self) -{ - GENERATE_JSON(fixnum); -}</pre> - </div> - </div> - - </div> - </div> - </div> - </body> -</html>
\ No newline at end of file diff --git a/doc/classes/JSON/Ext/Generator/GeneratorMethods/Float.html b/doc/classes/JSON/Ext/Generator/GeneratorMethods/Float.html deleted file mode 100644 index 95445d9..0000000 --- a/doc/classes/JSON/Ext/Generator/GeneratorMethods/Float.html +++ /dev/null @@ -1,125 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" - "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> -<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> -<head> - <title>JSON::Ext::Generator::GeneratorMethods::Float</title> - <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> - <link rel="stylesheet" href="../../../../../css/reset.css" type="text/css" media="screen" /> -<link rel="stylesheet" href="../../../../../css/main.css" type="text/css" media="screen" /> -<link rel="stylesheet" href="../../../../../css/github.css" type="text/css" media="screen" /> -<script src="../../../../../js/jquery-1.3.2.min.js" type="text/javascript" charset="utf-8"></script> -<script src="../../../../../js/jquery-effect.js" type="text/javascript" charset="utf-8"></script> -<script src="../../../../../js/main.js" type="text/javascript" charset="utf-8"></script> -<script src="../../../../../js/highlight.pack.js" type="text/javascript" charset="utf-8"></script> - -</head> - -<body> - <div class="banner"> - - <h1> - <span class="type">Module</span> - JSON::Ext::Generator::GeneratorMethods::Float - - </h1> - <ul class="files"> - - <li><a href="../../../../../files/ext/json/ext/generator/generator_c.html">ext/json/ext/generator/generator.c</a></li> - - </ul> - </div> - <div id="bodyContent"> - <div id="content"> - - - - - - - - - - - - - - - <!-- Method ref --> - <div class="sectiontitle">Methods</div> - <dl class="methods"> - - <dt>T</dt> - <dd> - <ul> - - - <li> - <a href="#method-i-to_json">to_json</a> - </li> - - </ul> - </dd> - - </dl> - - - - - - - - - - - - - - - - - - - <!-- Methods --> - - <div class="sectiontitle">Instance Public methods</div> - - <div class="method"> - <div class="title method-title" id="method-i-to_json"> - - <a name="method-i-to_json"></a><b>to_json(*) -</b> - - </div> - - - <div class="description"> - <p>Returns a <a href="../../../../JSON.html">JSON</a> string representation -for this <a href="Float.html">Float</a> number.</p> - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-to_json_source')" id="l_method-i-to_json_source">show</a> - - </p> - <div id="method-i-to_json_source" class="dyn-source"> - <pre>static VALUE mFloat_to_json(int argc, VALUE *argv, VALUE self) -{ - GENERATE_JSON(float); -}</pre> - </div> - </div> - - </div> - </div> - </div> - </body> -</html>
\ No newline at end of file diff --git a/doc/classes/JSON/Ext/Generator/GeneratorMethods/Hash.html b/doc/classes/JSON/Ext/Generator/GeneratorMethods/Hash.html deleted file mode 100644 index a7384d9..0000000 --- a/doc/classes/JSON/Ext/Generator/GeneratorMethods/Hash.html +++ /dev/null @@ -1,128 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" - "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> -<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> -<head> - <title>JSON::Ext::Generator::GeneratorMethods::Hash</title> - <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> - <link rel="stylesheet" href="../../../../../css/reset.css" type="text/css" media="screen" /> -<link rel="stylesheet" href="../../../../../css/main.css" type="text/css" media="screen" /> -<link rel="stylesheet" href="../../../../../css/github.css" type="text/css" media="screen" /> -<script src="../../../../../js/jquery-1.3.2.min.js" type="text/javascript" charset="utf-8"></script> -<script src="../../../../../js/jquery-effect.js" type="text/javascript" charset="utf-8"></script> -<script src="../../../../../js/main.js" type="text/javascript" charset="utf-8"></script> -<script src="../../../../../js/highlight.pack.js" type="text/javascript" charset="utf-8"></script> - -</head> - -<body> - <div class="banner"> - - <h1> - <span class="type">Module</span> - JSON::Ext::Generator::GeneratorMethods::Hash - - </h1> - <ul class="files"> - - <li><a href="../../../../../files/ext/json/ext/generator/generator_c.html">ext/json/ext/generator/generator.c</a></li> - - </ul> - </div> - <div id="bodyContent"> - <div id="content"> - - - - - - - - - - - - - - - <!-- Method ref --> - <div class="sectiontitle">Methods</div> - <dl class="methods"> - - <dt>T</dt> - <dd> - <ul> - - - <li> - <a href="#method-i-to_json">to_json</a> - </li> - - </ul> - </dd> - - </dl> - - - - - - - - - - - - - - - - - - - <!-- Methods --> - - <div class="sectiontitle">Instance Public methods</div> - - <div class="method"> - <div class="title method-title" id="method-i-to_json"> - - <a name="method-i-to_json"></a><b>to_json(state = nil) -</b> - - </div> - - - <div class="description"> - <p>Returns a <a href="../../../../JSON.html">JSON</a> string containing a <a -href="../../../../JSON.html">JSON</a> object, that is generated from this -<a href="Hash.html">Hash</a> instance. <em>state</em> is a JSON::State -object, that can also be used to configure the produced <a -href="../../../../JSON.html">JSON</a> string output further.</p> - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-to_json_source')" id="l_method-i-to_json_source">show</a> - - </p> - <div id="method-i-to_json_source" class="dyn-source"> - <pre>static VALUE mHash_to_json(int argc, VALUE *argv, VALUE self) -{ - GENERATE_JSON(object); -}</pre> - </div> - </div> - - </div> - </div> - </div> - </body> -</html>
\ No newline at end of file diff --git a/doc/classes/JSON/Ext/Generator/GeneratorMethods/NilClass.html b/doc/classes/JSON/Ext/Generator/GeneratorMethods/NilClass.html deleted file mode 100644 index 132aa3c..0000000 --- a/doc/classes/JSON/Ext/Generator/GeneratorMethods/NilClass.html +++ /dev/null @@ -1,124 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" - "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> -<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> -<head> - <title>JSON::Ext::Generator::GeneratorMethods::NilClass</title> - <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> - <link rel="stylesheet" href="../../../../../css/reset.css" type="text/css" media="screen" /> -<link rel="stylesheet" href="../../../../../css/main.css" type="text/css" media="screen" /> -<link rel="stylesheet" href="../../../../../css/github.css" type="text/css" media="screen" /> -<script src="../../../../../js/jquery-1.3.2.min.js" type="text/javascript" charset="utf-8"></script> -<script src="../../../../../js/jquery-effect.js" type="text/javascript" charset="utf-8"></script> -<script src="../../../../../js/main.js" type="text/javascript" charset="utf-8"></script> -<script src="../../../../../js/highlight.pack.js" type="text/javascript" charset="utf-8"></script> - -</head> - -<body> - <div class="banner"> - - <h1> - <span class="type">Module</span> - JSON::Ext::Generator::GeneratorMethods::NilClass - - </h1> - <ul class="files"> - - <li><a href="../../../../../files/ext/json/ext/generator/generator_c.html">ext/json/ext/generator/generator.c</a></li> - - </ul> - </div> - <div id="bodyContent"> - <div id="content"> - - - - - - - - - - - - - - - <!-- Method ref --> - <div class="sectiontitle">Methods</div> - <dl class="methods"> - - <dt>T</dt> - <dd> - <ul> - - - <li> - <a href="#method-i-to_json">to_json</a> - </li> - - </ul> - </dd> - - </dl> - - - - - - - - - - - - - - - - - - - <!-- Methods --> - - <div class="sectiontitle">Instance Public methods</div> - - <div class="method"> - <div class="title method-title" id="method-i-to_json"> - - <a name="method-i-to_json"></a><b>to_json(*) -</b> - - </div> - - - <div class="description"> - <p>Returns a <a href="../../../../JSON.html">JSON</a> string for nil: ‘null’.</p> - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-to_json_source')" id="l_method-i-to_json_source">show</a> - - </p> - <div id="method-i-to_json_source" class="dyn-source"> - <pre>static VALUE mNilClass_to_json(int argc, VALUE *argv, VALUE self) -{ - GENERATE_JSON(null); -}</pre> - </div> - </div> - - </div> - </div> - </div> - </body> -</html>
\ No newline at end of file diff --git a/doc/classes/JSON/Ext/Generator/GeneratorMethods/Object.html b/doc/classes/JSON/Ext/Generator/GeneratorMethods/Object.html deleted file mode 100644 index e731074..0000000 --- a/doc/classes/JSON/Ext/Generator/GeneratorMethods/Object.html +++ /dev/null @@ -1,133 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" - "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> -<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> -<head> - <title>JSON::Ext::Generator::GeneratorMethods::Object</title> - <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> - <link rel="stylesheet" href="../../../../../css/reset.css" type="text/css" media="screen" /> -<link rel="stylesheet" href="../../../../../css/main.css" type="text/css" media="screen" /> -<link rel="stylesheet" href="../../../../../css/github.css" type="text/css" media="screen" /> -<script src="../../../../../js/jquery-1.3.2.min.js" type="text/javascript" charset="utf-8"></script> -<script src="../../../../../js/jquery-effect.js" type="text/javascript" charset="utf-8"></script> -<script src="../../../../../js/main.js" type="text/javascript" charset="utf-8"></script> -<script src="../../../../../js/highlight.pack.js" type="text/javascript" charset="utf-8"></script> - -</head> - -<body> - <div class="banner"> - - <h1> - <span class="type">Module</span> - JSON::Ext::Generator::GeneratorMethods::Object - - </h1> - <ul class="files"> - - <li><a href="../../../../../files/ext/json/ext/generator/generator_c.html">ext/json/ext/generator/generator.c</a></li> - - </ul> - </div> - <div id="bodyContent"> - <div id="content"> - - - - - - - - - - - - - - - <!-- Method ref --> - <div class="sectiontitle">Methods</div> - <dl class="methods"> - - <dt>T</dt> - <dd> - <ul> - - - <li> - <a href="#method-i-to_json">to_json</a> - </li> - - </ul> - </dd> - - </dl> - - - - - - - - - - - - - - - - - - - <!-- Methods --> - - <div class="sectiontitle">Instance Public methods</div> - - <div class="method"> - <div class="title method-title" id="method-i-to_json"> - - <a name="method-i-to_json"></a><b>to_json(*) -</b> - - </div> - - - <div class="description"> - <p>Converts this object to a string (calling to_s), converts it to a <a -href="../../../../JSON.html">JSON</a> string, and returns the result. This -is a fallback, if no special method <a -href="Object.html#method-i-to_json">to_json</a> was defined for some -object.</p> - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-to_json_source')" id="l_method-i-to_json_source">show</a> - - </p> - <div id="method-i-to_json_source" class="dyn-source"> - <pre>static VALUE mObject_to_json(int argc, VALUE *argv, VALUE self) -{ - VALUE state; - VALUE string = rb_funcall(self, i_to_s, 0); - rb_scan_args(argc, argv, "01", &state); - Check_Type(string, T_STRING); - state = cState_from_state_s(cState, state); - return cState_partial_generate(state, string); -}</pre> - </div> - </div> - - </div> - </div> - </div> - </body> -</html>
\ No newline at end of file diff --git a/doc/classes/JSON/Ext/Generator/GeneratorMethods/String.html b/doc/classes/JSON/Ext/Generator/GeneratorMethods/String.html deleted file mode 100644 index dbbb90b..0000000 --- a/doc/classes/JSON/Ext/Generator/GeneratorMethods/String.html +++ /dev/null @@ -1,281 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" - "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> -<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> -<head> - <title>JSON::Ext::Generator::GeneratorMethods::String</title> - <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> - <link rel="stylesheet" href="../../../../../css/reset.css" type="text/css" media="screen" /> -<link rel="stylesheet" href="../../../../../css/main.css" type="text/css" media="screen" /> -<link rel="stylesheet" href="../../../../../css/github.css" type="text/css" media="screen" /> -<script src="../../../../../js/jquery-1.3.2.min.js" type="text/javascript" charset="utf-8"></script> -<script src="../../../../../js/jquery-effect.js" type="text/javascript" charset="utf-8"></script> -<script src="../../../../../js/main.js" type="text/javascript" charset="utf-8"></script> -<script src="../../../../../js/highlight.pack.js" type="text/javascript" charset="utf-8"></script> - -</head> - -<body> - <div class="banner"> - - <h1> - <span class="type">Module</span> - JSON::Ext::Generator::GeneratorMethods::String - - </h1> - <ul class="files"> - - <li><a href="../../../../../files/ext/json/ext/generator/generator_c.html">ext/json/ext/generator/generator.c</a></li> - - </ul> - </div> - <div id="bodyContent"> - <div id="content"> - - - - - - - - - - - - <!-- Namespace --> - <div class="sectiontitle">Namespace</div> - <ul> - - <li> - <span class="type">MODULE</span> - <a href="String/Extend.html">JSON::Ext::Generator::GeneratorMethods::String::Extend</a> - </li> - - </ul> - - - - - <!-- Method ref --> - <div class="sectiontitle">Methods</div> - <dl class="methods"> - - <dt>I</dt> - <dd> - <ul> - - - <li> - <a href="#method-c-included">included</a> - </li> - - </ul> - </dd> - - <dt>T</dt> - <dd> - <ul> - - - <li> - <a href="#method-i-to_json">to_json</a>, - </li> - - - <li> - <a href="#method-i-to_json_raw">to_json_raw</a>, - </li> - - - <li> - <a href="#method-i-to_json_raw_object">to_json_raw_object</a> - </li> - - </ul> - </dd> - - </dl> - - - - - - - - - - - - - - - - - - - <!-- Methods --> - - <div class="sectiontitle">Class Public methods</div> - - <div class="method"> - <div class="title method-title" id="method-c-included"> - - <a name="method-c-included"></a><b>String.included(modul) -</b> - - </div> - - - <div class="description"> - <p>Extends <em>modul</em> with the <a -href="String/Extend.html">String::Extend</a> module.</p> - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-c-included_source')" id="l_method-c-included_source">show</a> - - </p> - <div id="method-c-included_source" class="dyn-source"> - <pre>static VALUE mString_included_s(VALUE self, VALUE modul) { - VALUE result = rb_funcall(modul, i_extend, 1, mString_Extend); - return result; -}</pre> - </div> - </div> - - </div> - - <div class="sectiontitle">Instance Public methods</div> - - <div class="method"> - <div class="title method-title" id="method-i-to_json"> - - <a name="method-i-to_json"></a><b>to_json(*) -</b> - - </div> - - - <div class="description"> - <p>This string should be encoded with UTF-8 A call to this method returns a <a -href="../../../../JSON.html">JSON</a> string encoded with UTF16 big endian -characters as u????.</p> - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-to_json_source')" id="l_method-i-to_json_source">show</a> - - </p> - <div id="method-i-to_json_source" class="dyn-source"> - <pre>static VALUE mString_to_json(int argc, VALUE *argv, VALUE self) -{ - GENERATE_JSON(string); -}</pre> - </div> - </div> - - </div> - - <div class="method"> - <div class="title method-title" id="method-i-to_json_raw"> - - <a name="method-i-to_json_raw"></a><b>to_json_raw(*args) -</b> - - </div> - - - <div class="description"> - <p>This method creates a <a href="../../../../JSON.html">JSON</a> text from -the result of a call to <a -href="String.html#method-i-to_json_raw_object">#to_json_raw_object</a> of -this <a href="String.html">String</a>.</p> - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-to_json_raw_source')" id="l_method-i-to_json_raw_source">show</a> - - </p> - <div id="method-i-to_json_raw_source" class="dyn-source"> - <pre>static VALUE mString_to_json_raw(int argc, VALUE *argv, VALUE self) -{ - VALUE obj = mString_to_json_raw_object(self); - Check_Type(obj, T_HASH); - return mHash_to_json(argc, argv, obj); -}</pre> - </div> - </div> - - </div> - - <div class="method"> - <div class="title method-title" id="method-i-to_json_raw_object"> - - <a name="method-i-to_json_raw_object"></a><b>to_json_raw_object() -</b> - - </div> - - - <div class="description"> - <p>This method creates a raw object hash, that can be nested into other data -structures and will be generated as a raw string. This method should be -used, if you want to convert raw strings to <a -href="../../../../JSON.html">JSON</a> instead of UTF-8 strings, e. g. -binary data.</p> - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-to_json_raw_object_source')" id="l_method-i-to_json_raw_object_source">show</a> - - </p> - <div id="method-i-to_json_raw_object_source" class="dyn-source"> - <pre>static VALUE mString_to_json_raw_object(VALUE self) -{ - VALUE ary; - VALUE result = rb_hash_new(); - rb_hash_aset(result, rb_funcall(mJSON, i_create_id, 0), rb_class_name(rb_obj_class(self))); - ary = rb_funcall(self, i_unpack, 1, rb_str_new2("C*")); - rb_hash_aset(result, rb_str_new2("raw"), ary); - return result; -}</pre> - </div> - </div> - - </div> - </div> - </div> - </body> -</html>
\ No newline at end of file diff --git a/doc/classes/JSON/Ext/Generator/GeneratorMethods/String/Extend.html b/doc/classes/JSON/Ext/Generator/GeneratorMethods/String/Extend.html deleted file mode 100644 index aea6758..0000000 --- a/doc/classes/JSON/Ext/Generator/GeneratorMethods/String/Extend.html +++ /dev/null @@ -1,129 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" - "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> -<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> -<head> - <title>JSON::Ext::Generator::GeneratorMethods::String::Extend</title> - <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> - <link rel="stylesheet" href="../../../../../../css/reset.css" type="text/css" media="screen" /> -<link rel="stylesheet" href="../../../../../../css/main.css" type="text/css" media="screen" /> -<link rel="stylesheet" href="../../../../../../css/github.css" type="text/css" media="screen" /> -<script src="../../../../../../js/jquery-1.3.2.min.js" type="text/javascript" charset="utf-8"></script> -<script src="../../../../../../js/jquery-effect.js" type="text/javascript" charset="utf-8"></script> -<script src="../../../../../../js/main.js" type="text/javascript" charset="utf-8"></script> -<script src="../../../../../../js/highlight.pack.js" type="text/javascript" charset="utf-8"></script> - -</head> - -<body> - <div class="banner"> - - <h1> - <span class="type">Module</span> - JSON::Ext::Generator::GeneratorMethods::String::Extend - - </h1> - <ul class="files"> - - <li><a href="../../../../../../files/ext/json/ext/generator/generator_c.html">ext/json/ext/generator/generator.c</a></li> - - </ul> - </div> - <div id="bodyContent"> - <div id="content"> - - - - - - - - - - - - - - - <!-- Method ref --> - <div class="sectiontitle">Methods</div> - <dl class="methods"> - - <dt>J</dt> - <dd> - <ul> - - - <li> - <a href="#method-i-json_create">json_create</a> - </li> - - </ul> - </dd> - - </dl> - - - - - - - - - - - - - - - - - - - <!-- Methods --> - - <div class="sectiontitle">Instance Public methods</div> - - <div class="method"> - <div class="title method-title" id="method-i-json_create"> - - <a name="method-i-json_create"></a><b>json_create(o) -</b> - - </div> - - - <div class="description"> - <p>Raw Strings are <a href="../../../../../JSON.html">JSON</a> Objects (the -raw bytes are stored in an array for the key “raw”). The Ruby <a -href="../String.html">String</a> can be created by this module method.</p> - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-json_create_source')" id="l_method-i-json_create_source">show</a> - - </p> - <div id="method-i-json_create_source" class="dyn-source"> - <pre>static VALUE mString_Extend_json_create(VALUE self, VALUE o) -{ - VALUE ary; - Check_Type(o, T_HASH); - ary = rb_hash_aref(o, rb_str_new2("raw")); - return rb_funcall(ary, i_pack, 1, rb_str_new2("C*")); -}</pre> - </div> - </div> - - </div> - </div> - </div> - </body> -</html>
\ No newline at end of file diff --git a/doc/classes/JSON/Ext/Generator/GeneratorMethods/TrueClass.html b/doc/classes/JSON/Ext/Generator/GeneratorMethods/TrueClass.html deleted file mode 100644 index d9ac60c..0000000 --- a/doc/classes/JSON/Ext/Generator/GeneratorMethods/TrueClass.html +++ /dev/null @@ -1,124 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" - "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> -<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> -<head> - <title>JSON::Ext::Generator::GeneratorMethods::TrueClass</title> - <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> - <link rel="stylesheet" href="../../../../../css/reset.css" type="text/css" media="screen" /> -<link rel="stylesheet" href="../../../../../css/main.css" type="text/css" media="screen" /> -<link rel="stylesheet" href="../../../../../css/github.css" type="text/css" media="screen" /> -<script src="../../../../../js/jquery-1.3.2.min.js" type="text/javascript" charset="utf-8"></script> -<script src="../../../../../js/jquery-effect.js" type="text/javascript" charset="utf-8"></script> -<script src="../../../../../js/main.js" type="text/javascript" charset="utf-8"></script> -<script src="../../../../../js/highlight.pack.js" type="text/javascript" charset="utf-8"></script> - -</head> - -<body> - <div class="banner"> - - <h1> - <span class="type">Module</span> - JSON::Ext::Generator::GeneratorMethods::TrueClass - - </h1> - <ul class="files"> - - <li><a href="../../../../../files/ext/json/ext/generator/generator_c.html">ext/json/ext/generator/generator.c</a></li> - - </ul> - </div> - <div id="bodyContent"> - <div id="content"> - - - - - - - - - - - - - - - <!-- Method ref --> - <div class="sectiontitle">Methods</div> - <dl class="methods"> - - <dt>T</dt> - <dd> - <ul> - - - <li> - <a href="#method-i-to_json">to_json</a> - </li> - - </ul> - </dd> - - </dl> - - - - - - - - - - - - - - - - - - - <!-- Methods --> - - <div class="sectiontitle">Instance Public methods</div> - - <div class="method"> - <div class="title method-title" id="method-i-to_json"> - - <a name="method-i-to_json"></a><b>to_json(*) -</b> - - </div> - - - <div class="description"> - <p>Returns a <a href="../../../../JSON.html">JSON</a> string for true: ‘true’.</p> - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-to_json_source')" id="l_method-i-to_json_source">show</a> - - </p> - <div id="method-i-to_json_source" class="dyn-source"> - <pre>static VALUE mTrueClass_to_json(int argc, VALUE *argv, VALUE self) -{ - GENERATE_JSON(true); -}</pre> - </div> - </div> - - </div> - </div> - </div> - </body> -</html>
\ No newline at end of file diff --git a/doc/classes/JSON/Ext/Generator/State.html b/doc/classes/JSON/Ext/Generator/State.html deleted file mode 100644 index 0f27f0d..0000000 --- a/doc/classes/JSON/Ext/Generator/State.html +++ /dev/null @@ -1,1678 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" - "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> -<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> -<head> - <title>JSON::Ext::Generator::State</title> - <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> - <link rel="stylesheet" href="../../../../css/reset.css" type="text/css" media="screen" /> -<link rel="stylesheet" href="../../../../css/main.css" type="text/css" media="screen" /> -<link rel="stylesheet" href="../../../../css/github.css" type="text/css" media="screen" /> -<script src="../../../../js/jquery-1.3.2.min.js" type="text/javascript" charset="utf-8"></script> -<script src="../../../../js/jquery-effect.js" type="text/javascript" charset="utf-8"></script> -<script src="../../../../js/main.js" type="text/javascript" charset="utf-8"></script> -<script src="../../../../js/highlight.pack.js" type="text/javascript" charset="utf-8"></script> - -</head> - -<body> - <div class="banner"> - - <h1> - <span class="type">Class</span> - JSON::Ext::Generator::State - - <span class="parent">< - - Object - - </span> - - </h1> - <ul class="files"> - - <li><a href="../../../../files/ext/json/ext/generator/generator_c.html">ext/json/ext/generator/generator.c</a></li> - - </ul> - </div> - <div id="bodyContent"> - <div id="content"> - - - - - - - - - - - - - - - <!-- Method ref --> - <div class="sectiontitle">Methods</div> - <dl class="methods"> - - <dt>#</dt> - <dd> - <ul> - - - <li> - <a href="#method-i-5B-5D">[]</a> - </li> - - </ul> - </dd> - - <dt>A</dt> - <dd> - <ul> - - - <li> - <a href="#method-i-allow_nan-3F">allow_nan?</a>, - </li> - - - <li> - <a href="#method-i-array_nl">array_nl</a>, - </li> - - - <li> - <a href="#method-i-array_nl-3D">array_nl=</a>, - </li> - - - <li> - <a href="#method-i-ascii_only-3F">ascii_only?</a> - </li> - - </ul> - </dd> - - <dt>B</dt> - <dd> - <ul> - - - <li> - <a href="#method-i-buffer_initial_length">buffer_initial_length</a>, - </li> - - - <li> - <a href="#method-i-buffer_initial_length-3D">buffer_initial_length=</a> - </li> - - </ul> - </dd> - - <dt>C</dt> - <dd> - <ul> - - - <li> - <a href="#method-i-check_circular-3F">check_circular?</a>, - </li> - - - <li> - <a href="#method-i-configure">configure</a> - </li> - - </ul> - </dd> - - <dt>D</dt> - <dd> - <ul> - - - <li> - <a href="#method-i-depth">depth</a>, - </li> - - - <li> - <a href="#method-i-depth-3D">depth=</a> - </li> - - </ul> - </dd> - - <dt>F</dt> - <dd> - <ul> - - - <li> - <a href="#method-c-from_state">from_state</a> - </li> - - </ul> - </dd> - - <dt>G</dt> - <dd> - <ul> - - - <li> - <a href="#method-i-generate">generate</a> - </li> - - </ul> - </dd> - - <dt>I</dt> - <dd> - <ul> - - - <li> - <a href="#method-i-indent">indent</a>, - </li> - - - <li> - <a href="#method-i-indent-3D">indent=</a>, - </li> - - - <li> - <a href="#method-i-initialize_copy">initialize_copy</a> - </li> - - </ul> - </dd> - - <dt>M</dt> - <dd> - <ul> - - - <li> - <a href="#method-i-max_nesting">max_nesting</a>, - </li> - - - <li> - <a href="#method-i-max_nesting-3D">max_nesting=</a>, - </li> - - - <li> - <a href="#method-i-merge">merge</a> - </li> - - </ul> - </dd> - - <dt>N</dt> - <dd> - <ul> - - - <li> - <a href="#method-c-new">new</a> - </li> - - </ul> - </dd> - - <dt>O</dt> - <dd> - <ul> - - - <li> - <a href="#method-i-object_nl">object_nl</a>, - </li> - - - <li> - <a href="#method-i-object_nl-3D">object_nl=</a> - </li> - - </ul> - </dd> - - <dt>Q</dt> - <dd> - <ul> - - - <li> - <a href="#method-i-quirks_mode">quirks_mode</a>, - </li> - - - <li> - <a href="#method-i-quirks_mode-3D">quirks_mode=</a>, - </li> - - - <li> - <a href="#method-i-quirks_mode-3F">quirks_mode?</a> - </li> - - </ul> - </dd> - - <dt>S</dt> - <dd> - <ul> - - - <li> - <a href="#method-i-space">space</a>, - </li> - - - <li> - <a href="#method-i-space-3D">space=</a>, - </li> - - - <li> - <a href="#method-i-space_before">space_before</a>, - </li> - - - <li> - <a href="#method-i-space_before-3D">space_before=</a> - </li> - - </ul> - </dd> - - <dt>T</dt> - <dd> - <ul> - - - <li> - <a href="#method-i-to_h">to_h</a> - </li> - - </ul> - </dd> - - </dl> - - - - - - - - - - - - - - - - - - - <!-- Methods --> - - <div class="sectiontitle">Class Public methods</div> - - <div class="method"> - <div class="title method-title" id="method-c-from_state"> - - <a name="method-c-from_state"></a><b>from_state(opts) -</b> - - </div> - - - <div class="description"> - <p>Creates a <a href="State.html">State</a> object from <em>opts</em>, which -ought to be Hash to create a new <a href="State.html">State</a> instance -configured by <em>opts</em>, something else to create an unconfigured -instance. If <em>opts</em> is a <a href="State.html">State</a> object, it -is just returned.</p> - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-c-from_state_source')" id="l_method-c-from_state_source">show</a> - - </p> - <div id="method-c-from_state_source" class="dyn-source"> - <pre>static VALUE cState_from_state_s(VALUE self, VALUE opts) -{ - if (rb_obj_is_kind_of(opts, self)) { - return opts; - } else if (rb_obj_is_kind_of(opts, rb_cHash)) { - return rb_funcall(self, i_new, 1, opts); - } else { - if (NIL_P(CJSON_SAFE_STATE_PROTOTYPE)) { - CJSON_SAFE_STATE_PROTOTYPE = rb_const_get(mJSON, i_SAFE_STATE_PROTOTYPE); - } - return rb_funcall(CJSON_SAFE_STATE_PROTOTYPE, i_dup, 0); - } -}</pre> - </div> - </div> - - </div> - - <div class="method"> - <div class="title method-title" id="method-c-new"> - - <a name="method-c-new"></a><b>new(opts = {}) -</b> - - </div> - - - <div class="description"> - <p>Instantiates a new <a href="State.html">State</a> object, configured by -<em>opts</em>.</p> - -<p><em>opts</em> can have the following keys:</p> -<ul><li> -<p><strong>indent</strong>: a string used to indent levels (default: "),</p> -</li><li> -<p><strong>space</strong>: a string that is put after, a : or , delimiter -(default: "),</p> -</li><li> -<p><strong><a -href="State.html#method-i-space_before">#space_before</a></strong>: a -string that is put before a : pair delimiter (default: "),</p> -</li><li> -<p><strong><a href="State.html#method-i-object_nl">#object_nl</a></strong>: a -string that is put at the end of a <a href="../../../JSON.html">JSON</a> -object (default: "),</p> -</li><li> -<p><strong><a href="State.html#method-i-array_nl">#array_nl</a></strong>: a -string that is put at the end of a <a href="../../../JSON.html">JSON</a> -array (default: "),</p> -</li><li> -<p><strong>allow_nan</strong>: true if NaN, Infinity, and -Infinity should be -generated, otherwise an exception is thrown, if these values are -encountered. This options defaults to false.</p> -</li><li> -<p><strong><a -href="State.html#method-i-quirks_mode">#quirks_mode</a></strong>: Enables -<a href="State.html#method-i-quirks_mode">#quirks_mode</a> for parser, that -is for example generating single <a href="../../../JSON.html">JSON</a> -values instead of documents is possible.</p> -</li><li> -<p><strong><a -href="State.html#method-i-buffer_initial_length">#buffer_initial_length</a></strong>: -sets the initial length of the generator's internal buffer.</p> -</li></ul> - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-c-new_source')" id="l_method-c-new_source">show</a> - - </p> - <div id="method-c-new_source" class="dyn-source"> - <pre>static VALUE cState_initialize(int argc, VALUE *argv, VALUE self) -{ - VALUE opts; - GET_STATE(self); - state->max_nesting = 19; - state->buffer_initial_length = FBUFFER_INITIAL_LENGTH_DEFAULT; - rb_scan_args(argc, argv, "01", &opts); - if (!NIL_P(opts)) cState_configure(self, opts); - return self; -}</pre> - </div> - </div> - - </div> - - <div class="sectiontitle">Instance Public methods</div> - - <div class="method"> - <div class="title method-title" id="method-i-5B-5D"> - - <a name="method-i-5B-5D"></a><b>[](name) -</b> - - </div> - - - <div class="description"> - <p>Return the value returned by method <code>name</code>.</p> - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-5B-5D_source')" id="l_method-i-5B-5D_source">show</a> - - </p> - <div id="method-i-5B-5D_source" class="dyn-source"> - <pre>static VALUE cState_aref(VALUE self, VALUE name) -{ - GET_STATE(self); - if (RTEST(rb_funcall(self, i_respond_to_p, 1, name))) { - return rb_funcall(self, i_send, 1, name); - } else { - return Qnil; - } -}</pre> - </div> - </div> - - </div> - - <div class="method"> - <div class="title method-title" id="method-i-allow_nan-3F"> - - <a name="method-i-allow_nan-3F"></a><b>allow_nan? -</b> - - </div> - - - <div class="description"> - <p>Returns true, if NaN, Infinity, and -Infinity should be generated, -otherwise returns false.</p> - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-allow_nan-3F_source')" id="l_method-i-allow_nan-3F_source">show</a> - - </p> - <div id="method-i-allow_nan-3F_source" class="dyn-source"> - <pre>static VALUE cState_allow_nan_p(VALUE self) -{ - GET_STATE(self); - return state->allow_nan ? Qtrue : Qfalse; -}</pre> - </div> - </div> - - </div> - - <div class="method"> - <div class="title method-title" id="method-i-array_nl"> - - <a name="method-i-array_nl"></a><b>array_nl() -</b> - - </div> - - - <div class="description"> - <p>This string is put at the end of a line that holds a <a -href="../../../JSON.html">JSON</a> array.</p> - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-array_nl_source')" id="l_method-i-array_nl_source">show</a> - - </p> - <div id="method-i-array_nl_source" class="dyn-source"> - <pre>static VALUE cState_array_nl(VALUE self) -{ - GET_STATE(self); - return state->array_nl ? rb_str_new2(state->array_nl) : rb_str_new2(""); -}</pre> - </div> - </div> - - </div> - - <div class="method"> - <div class="title method-title" id="method-i-array_nl-3D"> - - <a name="method-i-array_nl-3D"></a><b>array_nl=(array_nl) -</b> - - </div> - - - <div class="description"> - <p>This string is put at the end of a line that holds a <a -href="../../../JSON.html">JSON</a> array.</p> - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-array_nl-3D_source')" id="l_method-i-array_nl-3D_source">show</a> - - </p> - <div id="method-i-array_nl-3D_source" class="dyn-source"> - <pre>static VALUE cState_array_nl_set(VALUE self, VALUE array_nl) -{ - unsigned long len; - GET_STATE(self); - Check_Type(array_nl, T_STRING); - len = RSTRING_LEN(array_nl); - if (len == 0) { - if (state->array_nl) { - ruby_xfree(state->array_nl); - state->array_nl = NULL; - } - } else { - if (state->array_nl) ruby_xfree(state->array_nl); - state->array_nl = strdup(RSTRING_PTR(array_nl)); - state->array_nl_len = len; - } - return Qnil; -}</pre> - </div> - </div> - - </div> - - <div class="method"> - <div class="title method-title" id="method-i-ascii_only-3F"> - - <a name="method-i-ascii_only-3F"></a><b>ascii_only? -</b> - - </div> - - - <div class="description"> - <p>Returns true, if NaN, Infinity, and -Infinity should be generated, -otherwise returns false.</p> - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-ascii_only-3F_source')" id="l_method-i-ascii_only-3F_source">show</a> - - </p> - <div id="method-i-ascii_only-3F_source" class="dyn-source"> - <pre>static VALUE cState_ascii_only_p(VALUE self) -{ - GET_STATE(self); - return state->ascii_only ? Qtrue : Qfalse; -}</pre> - </div> - </div> - - </div> - - <div class="method"> - <div class="title method-title" id="method-i-buffer_initial_length"> - - <a name="method-i-buffer_initial_length"></a><b>buffer_initial_length -</b> - - </div> - - - <div class="description"> - <p>This integer returns the current inital length of the buffer.</p> - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-buffer_initial_length_source')" id="l_method-i-buffer_initial_length_source">show</a> - - </p> - <div id="method-i-buffer_initial_length_source" class="dyn-source"> - <pre>static VALUE cState_buffer_initial_length(VALUE self) -{ - GET_STATE(self); - return LONG2FIX(state->buffer_initial_length); -}</pre> - </div> - </div> - - </div> - - <div class="method"> - <div class="title method-title" id="method-i-buffer_initial_length-3D"> - - <a name="method-i-buffer_initial_length-3D"></a><b>buffer_initial_length=(length) -</b> - - </div> - - - <div class="description"> - <p>This sets the initial length of the buffer to <code>length</code>, if -<code>length</code> > 0, otherwise its value isn’t changed.</p> - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-buffer_initial_length-3D_source')" id="l_method-i-buffer_initial_length-3D_source">show</a> - - </p> - <div id="method-i-buffer_initial_length-3D_source" class="dyn-source"> - <pre>static VALUE cState_buffer_initial_length_set(VALUE self, VALUE buffer_initial_length) -{ - long initial_length; - GET_STATE(self); - Check_Type(buffer_initial_length, T_FIXNUM); - initial_length = FIX2LONG(buffer_initial_length); - if (initial_length > 0) { - state->buffer_initial_length = initial_length; - } - return Qnil; -}</pre> - </div> - </div> - - </div> - - <div class="method"> - <div class="title method-title" id="method-i-check_circular-3F"> - - <a name="method-i-check_circular-3F"></a><b>check_circular? -</b> - - </div> - - - <div class="description"> - <p>Returns true, if circular data structures should be checked, otherwise -returns false.</p> - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-check_circular-3F_source')" id="l_method-i-check_circular-3F_source">show</a> - - </p> - <div id="method-i-check_circular-3F_source" class="dyn-source"> - <pre>static VALUE cState_check_circular_p(VALUE self) -{ - GET_STATE(self); - return state->max_nesting ? Qtrue : Qfalse; -}</pre> - </div> - </div> - - </div> - - <div class="method"> - <div class="title method-title" id="method-i-configure"> - - <a name="method-i-configure"></a><b>configure(opts) -</b> - - </div> - - - <div class="description"> - <p>Configure this <a href="State.html">State</a> instance with the Hash -<em>opts</em>, and return itself.</p> - </div> - - - - <div class="aka"> - Also aliased as: <a href="State.html#method-i-merge">merge</a> - </div> - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-configure_source')" id="l_method-i-configure_source">show</a> - - </p> - <div id="method-i-configure_source" class="dyn-source"> - <pre>static VALUE cState_configure(VALUE self, VALUE opts) -{ - VALUE tmp; - GET_STATE(self); - tmp = rb_convert_type(opts, T_HASH, "Hash", "to_hash"); - if (NIL_P(tmp)) tmp = rb_convert_type(opts, T_HASH, "Hash", "to_h"); - if (NIL_P(tmp)) { - rb_raise(rb_eArgError, "opts has to be hash like or convertable into a hash"); - } - opts = tmp; - tmp = rb_hash_aref(opts, ID2SYM(i_indent)); - if (RTEST(tmp)) { - unsigned long len; - Check_Type(tmp, T_STRING); - len = RSTRING_LEN(tmp); - state->indent = fstrndup(RSTRING_PTR(tmp), len); - state->indent_len = len; - } - tmp = rb_hash_aref(opts, ID2SYM(i_space)); - if (RTEST(tmp)) { - unsigned long len; - Check_Type(tmp, T_STRING); - len = RSTRING_LEN(tmp); - state->space = fstrndup(RSTRING_PTR(tmp), len); - state->space_len = len; - } - tmp = rb_hash_aref(opts, ID2SYM(i_space_before)); - if (RTEST(tmp)) { - unsigned long len; - Check_Type(tmp, T_STRING); - len = RSTRING_LEN(tmp); - state->space_before = fstrndup(RSTRING_PTR(tmp), len); - state->space_before_len = len; - } - tmp = rb_hash_aref(opts, ID2SYM(i_array_nl)); - if (RTEST(tmp)) { - unsigned long len; - Check_Type(tmp, T_STRING); - len = RSTRING_LEN(tmp); - state->array_nl = fstrndup(RSTRING_PTR(tmp), len); - state->array_nl_len = len; - } - tmp = rb_hash_aref(opts, ID2SYM(i_object_nl)); - if (RTEST(tmp)) { - unsigned long len; - Check_Type(tmp, T_STRING); - len = RSTRING_LEN(tmp); - state->object_nl = fstrndup(RSTRING_PTR(tmp), len); - state->object_nl_len = len; - } - tmp = ID2SYM(i_max_nesting); - state->max_nesting = 19; - if (option_given_p(opts, tmp)) { - VALUE max_nesting = rb_hash_aref(opts, tmp); - if (RTEST(max_nesting)) { - Check_Type(max_nesting, T_FIXNUM); - state->max_nesting = FIX2LONG(max_nesting); - } else { - state->max_nesting = 0; - } - } - tmp = ID2SYM(i_depth); - state->depth = 0; - if (option_given_p(opts, tmp)) { - VALUE depth = rb_hash_aref(opts, tmp); - if (RTEST(depth)) { - Check_Type(depth, T_FIXNUM); - state->depth = FIX2LONG(depth); - } else { - state->depth = 0; - } - } - tmp = ID2SYM(i_buffer_initial_length); - if (option_given_p(opts, tmp)) { - VALUE buffer_initial_length = rb_hash_aref(opts, tmp); - if (RTEST(buffer_initial_length)) { - long initial_length; - Check_Type(buffer_initial_length, T_FIXNUM); - initial_length = FIX2LONG(buffer_initial_length); - if (initial_length > 0) state->buffer_initial_length = initial_length; - } - } - tmp = rb_hash_aref(opts, ID2SYM(i_allow_nan)); - state->allow_nan = RTEST(tmp); - tmp = rb_hash_aref(opts, ID2SYM(i_ascii_only)); - state->ascii_only = RTEST(tmp); - tmp = rb_hash_aref(opts, ID2SYM(i_quirks_mode)); - state->quirks_mode = RTEST(tmp); - return self; -}</pre> - </div> - </div> - - </div> - - <div class="method"> - <div class="title method-title" id="method-i-depth"> - - <a name="method-i-depth"></a><b>depth -</b> - - </div> - - - <div class="description"> - <p>This integer returns the current depth of data structure nesting.</p> - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-depth_source')" id="l_method-i-depth_source">show</a> - - </p> - <div id="method-i-depth_source" class="dyn-source"> - <pre>static VALUE cState_depth(VALUE self) -{ - GET_STATE(self); - return LONG2FIX(state->depth); -}</pre> - </div> - </div> - - </div> - - <div class="method"> - <div class="title method-title" id="method-i-depth-3D"> - - <a name="method-i-depth-3D"></a><b>depth=(depth) -</b> - - </div> - - - <div class="description"> - <p>This sets the maximum level of data structure nesting in the generated <a -href="../../../JSON.html">JSON</a> to the integer depth, <a -href="State.html#method-i-max_nesting">#max_nesting</a> = 0 if no maximum -should be checked.</p> - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-depth-3D_source')" id="l_method-i-depth-3D_source">show</a> - - </p> - <div id="method-i-depth-3D_source" class="dyn-source"> - <pre>static VALUE cState_depth_set(VALUE self, VALUE depth) -{ - GET_STATE(self); - Check_Type(depth, T_FIXNUM); - state->depth = FIX2LONG(depth); - return Qnil; -}</pre> - </div> - </div> - - </div> - - <div class="method"> - <div class="title method-title" id="method-i-generate"> - - <a name="method-i-generate"></a><b>generate(obj) -</b> - - </div> - - - <div class="description"> - <p>Generates a valid <a href="../../../JSON.html">JSON</a> document from -object <code>obj</code> and returns the result. If no valid <a -href="../../../JSON.html">JSON</a> document can be created this method -raises a <a href="../../GeneratorError.html">GeneratorError</a> exception.</p> - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-generate_source')" id="l_method-i-generate_source">show</a> - - </p> - <div id="method-i-generate_source" class="dyn-source"> - <pre>static VALUE cState_generate(VALUE self, VALUE obj) -{ - VALUE result = cState_partial_generate(self, obj); - GET_STATE(self); - if (!state->quirks_mode && !isArrayOrObject(result)) { - rb_raise(eGeneratorError, "only generation of JSON objects or arrays allowed"); - } - return result; -}</pre> - </div> - </div> - - </div> - - <div class="method"> - <div class="title method-title" id="method-i-indent"> - - <a name="method-i-indent"></a><b>indent() -</b> - - </div> - - - <div class="description"> - <p>This string is used to indent levels in the <a -href="../../../JSON.html">JSON</a> text.</p> - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-indent_source')" id="l_method-i-indent_source">show</a> - - </p> - <div id="method-i-indent_source" class="dyn-source"> - <pre>static VALUE cState_indent(VALUE self) -{ - GET_STATE(self); - return state->indent ? rb_str_new2(state->indent) : rb_str_new2(""); -}</pre> - </div> - </div> - - </div> - - <div class="method"> - <div class="title method-title" id="method-i-indent-3D"> - - <a name="method-i-indent-3D"></a><b>indent=(indent) -</b> - - </div> - - - <div class="description"> - <p>This string is used to indent levels in the <a -href="../../../JSON.html">JSON</a> text.</p> - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-indent-3D_source')" id="l_method-i-indent-3D_source">show</a> - - </p> - <div id="method-i-indent-3D_source" class="dyn-source"> - <pre>static VALUE cState_indent_set(VALUE self, VALUE indent) -{ - unsigned long len; - GET_STATE(self); - Check_Type(indent, T_STRING); - len = RSTRING_LEN(indent); - if (len == 0) { - if (state->indent) { - ruby_xfree(state->indent); - state->indent = NULL; - state->indent_len = 0; - } - } else { - if (state->indent) ruby_xfree(state->indent); - state->indent = strdup(RSTRING_PTR(indent)); - state->indent_len = len; - } - return Qnil; -}</pre> - </div> - </div> - - </div> - - <div class="method"> - <div class="title method-title" id="method-i-initialize_copy"> - - <a name="method-i-initialize_copy"></a><b>initialize_copy(orig) -</b> - - </div> - - - <div class="description"> - <p>Initializes this object from orig if it to be duplicated/cloned and returns -it.</p> - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-initialize_copy_source')" id="l_method-i-initialize_copy_source">show</a> - - </p> - <div id="method-i-initialize_copy_source" class="dyn-source"> - <pre>static VALUE cState_init_copy(VALUE obj, VALUE orig) -{ - JSON_Generator_State *objState, *origState; - - Data_Get_Struct(obj, JSON_Generator_State, objState); - Data_Get_Struct(orig, JSON_Generator_State, origState); - if (!objState) rb_raise(rb_eArgError, "unallocated JSON::State"); - - MEMCPY(objState, origState, JSON_Generator_State, 1); - objState->indent = fstrndup(origState->indent, origState->indent_len); - objState->space = fstrndup(origState->space, origState->space_len); - objState->space_before = fstrndup(origState->space_before, origState->space_before_len); - objState->object_nl = fstrndup(origState->object_nl, origState->object_nl_len); - objState->array_nl = fstrndup(origState->array_nl, origState->array_nl_len); - if (origState->array_delim) objState->array_delim = fbuffer_dup(origState->array_delim); - if (origState->object_delim) objState->object_delim = fbuffer_dup(origState->object_delim); - if (origState->object_delim2) objState->object_delim2 = fbuffer_dup(origState->object_delim2); - return obj; -}</pre> - </div> - </div> - - </div> - - <div class="method"> - <div class="title method-title" id="method-i-max_nesting"> - - <a name="method-i-max_nesting"></a><b>max_nesting -</b> - - </div> - - - <div class="description"> - <p>This integer returns the maximum level of data structure nesting in the -generated <a href="../../../JSON.html">JSON</a>, <a -href="State.html#method-i-max_nesting">#max_nesting</a> = 0 if no maximum -is checked.</p> - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-max_nesting_source')" id="l_method-i-max_nesting_source">show</a> - - </p> - <div id="method-i-max_nesting_source" class="dyn-source"> - <pre>static VALUE cState_max_nesting(VALUE self) -{ - GET_STATE(self); - return LONG2FIX(state->max_nesting); -}</pre> - </div> - </div> - - </div> - - <div class="method"> - <div class="title method-title" id="method-i-max_nesting-3D"> - - <a name="method-i-max_nesting-3D"></a><b>max_nesting=(depth) -</b> - - </div> - - - <div class="description"> - <p>This sets the maximum level of data structure nesting in the generated <a -href="../../../JSON.html">JSON</a> to the integer depth, <a -href="State.html#method-i-max_nesting">#max_nesting</a> = 0 if no maximum -should be checked.</p> - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-max_nesting-3D_source')" id="l_method-i-max_nesting-3D_source">show</a> - - </p> - <div id="method-i-max_nesting-3D_source" class="dyn-source"> - <pre>static VALUE cState_max_nesting_set(VALUE self, VALUE depth) -{ - GET_STATE(self); - Check_Type(depth, T_FIXNUM); - return state->max_nesting = FIX2LONG(depth); -}</pre> - </div> - </div> - - </div> - - <div class="method"> - <div class="title method-title" id="method-i-merge"> - - <a name="method-i-merge"></a><b>merge</b>(p1) - - </div> - - - <div class="description"> - - </div> - - - - - - </div> - - <div class="method"> - <div class="title method-title" id="method-i-object_nl"> - - <a name="method-i-object_nl"></a><b>object_nl() -</b> - - </div> - - - <div class="description"> - <p>This string is put at the end of a line that holds a <a -href="../../../JSON.html">JSON</a> object (or Hash).</p> - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-object_nl_source')" id="l_method-i-object_nl_source">show</a> - - </p> - <div id="method-i-object_nl_source" class="dyn-source"> - <pre>static VALUE cState_object_nl(VALUE self) -{ - GET_STATE(self); - return state->object_nl ? rb_str_new2(state->object_nl) : rb_str_new2(""); -}</pre> - </div> - </div> - - </div> - - <div class="method"> - <div class="title method-title" id="method-i-object_nl-3D"> - - <a name="method-i-object_nl-3D"></a><b>object_nl=(object_nl) -</b> - - </div> - - - <div class="description"> - <p>This string is put at the end of a line that holds a <a -href="../../../JSON.html">JSON</a> object (or Hash).</p> - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-object_nl-3D_source')" id="l_method-i-object_nl-3D_source">show</a> - - </p> - <div id="method-i-object_nl-3D_source" class="dyn-source"> - <pre>static VALUE cState_object_nl_set(VALUE self, VALUE object_nl) -{ - unsigned long len; - GET_STATE(self); - Check_Type(object_nl, T_STRING); - len = RSTRING_LEN(object_nl); - if (len == 0) { - if (state->object_nl) { - ruby_xfree(state->object_nl); - state->object_nl = NULL; - } - } else { - if (state->object_nl) ruby_xfree(state->object_nl); - state->object_nl = strdup(RSTRING_PTR(object_nl)); - state->object_nl_len = len; - } - return Qnil; -}</pre> - </div> - </div> - - </div> - - <div class="method"> - <div class="title method-title" id="method-i-quirks_mode"> - - <a name="method-i-quirks_mode"></a><b>quirks_mode? -</b> - - </div> - - - <div class="description"> - <p>Returns true, if quirks mode is enabled. Otherwise returns false.</p> - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-quirks_mode_source')" id="l_method-i-quirks_mode_source">show</a> - - </p> - <div id="method-i-quirks_mode_source" class="dyn-source"> - <pre>static VALUE cState_quirks_mode_p(VALUE self) -{ - GET_STATE(self); - return state->quirks_mode ? Qtrue : Qfalse; -}</pre> - </div> - </div> - - </div> - - <div class="method"> - <div class="title method-title" id="method-i-quirks_mode-3D"> - - <a name="method-i-quirks_mode-3D"></a><b>quirks_mode=(enable) -</b> - - </div> - - - <div class="description"> - <p>If set to true, enables the <a -href="State.html#method-i-quirks_mode">#quirks_mode</a> mode.</p> - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-quirks_mode-3D_source')" id="l_method-i-quirks_mode-3D_source">show</a> - - </p> - <div id="method-i-quirks_mode-3D_source" class="dyn-source"> - <pre>static VALUE cState_quirks_mode_set(VALUE self, VALUE enable) -{ - GET_STATE(self); - state->quirks_mode = RTEST(enable); - return Qnil; -}</pre> - </div> - </div> - - </div> - - <div class="method"> - <div class="title method-title" id="method-i-quirks_mode-3F"> - - <a name="method-i-quirks_mode-3F"></a><b>quirks_mode? -</b> - - </div> - - - <div class="description"> - <p>Returns true, if quirks mode is enabled. Otherwise returns false.</p> - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-quirks_mode-3F_source')" id="l_method-i-quirks_mode-3F_source">show</a> - - </p> - <div id="method-i-quirks_mode-3F_source" class="dyn-source"> - <pre>static VALUE cState_quirks_mode_p(VALUE self) -{ - GET_STATE(self); - return state->quirks_mode ? Qtrue : Qfalse; -}</pre> - </div> - </div> - - </div> - - <div class="method"> - <div class="title method-title" id="method-i-space"> - - <a name="method-i-space"></a><b>space() -</b> - - </div> - - - <div class="description"> - <p>This string is used to insert a space between the tokens in a <a -href="../../../JSON.html">JSON</a> string.</p> - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-space_source')" id="l_method-i-space_source">show</a> - - </p> - <div id="method-i-space_source" class="dyn-source"> - <pre>static VALUE cState_space(VALUE self) -{ - GET_STATE(self); - return state->space ? rb_str_new2(state->space) : rb_str_new2(""); -}</pre> - </div> - </div> - - </div> - - <div class="method"> - <div class="title method-title" id="method-i-space-3D"> - - <a name="method-i-space-3D"></a><b>space=(space) -</b> - - </div> - - - <div class="description"> - <p>This string is used to insert a space between the tokens in a <a -href="../../../JSON.html">JSON</a> string.</p> - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-space-3D_source')" id="l_method-i-space-3D_source">show</a> - - </p> - <div id="method-i-space-3D_source" class="dyn-source"> - <pre>static VALUE cState_space_set(VALUE self, VALUE space) -{ - unsigned long len; - GET_STATE(self); - Check_Type(space, T_STRING); - len = RSTRING_LEN(space); - if (len == 0) { - if (state->space) { - ruby_xfree(state->space); - state->space = NULL; - state->space_len = 0; - } - } else { - if (state->space) ruby_xfree(state->space); - state->space = strdup(RSTRING_PTR(space)); - state->space_len = len; - } - return Qnil; -}</pre> - </div> - </div> - - </div> - - <div class="method"> - <div class="title method-title" id="method-i-space_before"> - - <a name="method-i-space_before"></a><b>space_before() -</b> - - </div> - - - <div class="description"> - <p>This string is used to insert a space before the ‘:’ in <a -href="../../../JSON.html">JSON</a> objects.</p> - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-space_before_source')" id="l_method-i-space_before_source">show</a> - - </p> - <div id="method-i-space_before_source" class="dyn-source"> - <pre>static VALUE cState_space_before(VALUE self) -{ - GET_STATE(self); - return state->space_before ? rb_str_new2(state->space_before) : rb_str_new2(""); -}</pre> - </div> - </div> - - </div> - - <div class="method"> - <div class="title method-title" id="method-i-space_before-3D"> - - <a name="method-i-space_before-3D"></a><b>space_before=(space_before) -</b> - - </div> - - - <div class="description"> - <p>This string is used to insert a space before the ‘:’ in <a -href="../../../JSON.html">JSON</a> objects.</p> - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-space_before-3D_source')" id="l_method-i-space_before-3D_source">show</a> - - </p> - <div id="method-i-space_before-3D_source" class="dyn-source"> - <pre>static VALUE cState_space_before_set(VALUE self, VALUE space_before) -{ - unsigned long len; - GET_STATE(self); - Check_Type(space_before, T_STRING); - len = RSTRING_LEN(space_before); - if (len == 0) { - if (state->space_before) { - ruby_xfree(state->space_before); - state->space_before = NULL; - state->space_before_len = 0; - } - } else { - if (state->space_before) ruby_xfree(state->space_before); - state->space_before = strdup(RSTRING_PTR(space_before)); - state->space_before_len = len; - } - return Qnil; -}</pre> - </div> - </div> - - </div> - - <div class="method"> - <div class="title method-title" id="method-i-to_h"> - - <a name="method-i-to_h"></a><b>to_h -</b> - - </div> - - - <div class="description"> - <p>Returns the configuration instance variables as a hash, that can be passed -to the configure method.</p> - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-to_h_source')" id="l_method-i-to_h_source">show</a> - - </p> - <div id="method-i-to_h_source" class="dyn-source"> - <pre>static VALUE cState_to_h(VALUE self) -{ - VALUE result = rb_hash_new(); - GET_STATE(self); - rb_hash_aset(result, ID2SYM(i_indent), rb_str_new(state->indent, state->indent_len)); - rb_hash_aset(result, ID2SYM(i_space), rb_str_new(state->space, state->space_len)); - rb_hash_aset(result, ID2SYM(i_space_before), rb_str_new(state->space_before, state->space_before_len)); - rb_hash_aset(result, ID2SYM(i_object_nl), rb_str_new(state->object_nl, state->object_nl_len)); - rb_hash_aset(result, ID2SYM(i_array_nl), rb_str_new(state->array_nl, state->array_nl_len)); - rb_hash_aset(result, ID2SYM(i_allow_nan), state->allow_nan ? Qtrue : Qfalse); - rb_hash_aset(result, ID2SYM(i_ascii_only), state->ascii_only ? Qtrue : Qfalse); - rb_hash_aset(result, ID2SYM(i_quirks_mode), state->quirks_mode ? Qtrue : Qfalse); - rb_hash_aset(result, ID2SYM(i_max_nesting), LONG2FIX(state->max_nesting)); - rb_hash_aset(result, ID2SYM(i_depth), LONG2FIX(state->depth)); - rb_hash_aset(result, ID2SYM(i_buffer_initial_length), LONG2FIX(state->buffer_initial_length)); - return result; -}</pre> - </div> - </div> - - </div> - </div> - </div> - </body> -</html>
\ No newline at end of file diff --git a/doc/classes/JSON/Ext/Parser.html b/doc/classes/JSON/Ext/Parser.html deleted file mode 100644 index e3e64e4..0000000 --- a/doc/classes/JSON/Ext/Parser.html +++ /dev/null @@ -1,415 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" - "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> -<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> -<head> - <title>JSON::Ext::Parser</title> - <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> - <link rel="stylesheet" href="../../../css/reset.css" type="text/css" media="screen" /> -<link rel="stylesheet" href="../../../css/main.css" type="text/css" media="screen" /> -<link rel="stylesheet" href="../../../css/github.css" type="text/css" media="screen" /> -<script src="../../../js/jquery-1.3.2.min.js" type="text/javascript" charset="utf-8"></script> -<script src="../../../js/jquery-effect.js" type="text/javascript" charset="utf-8"></script> -<script src="../../../js/main.js" type="text/javascript" charset="utf-8"></script> -<script src="../../../js/highlight.pack.js" type="text/javascript" charset="utf-8"></script> - -</head> - -<body> - <div class="banner"> - - <h1> - <span class="type">Class</span> - JSON::Ext::Parser - - <span class="parent">< - - Object - - </span> - - </h1> - <ul class="files"> - - <li><a href="../../../files/ext/json/ext/parser/parser_c.html">ext/json/ext/parser/parser.c</a></li> - - </ul> - </div> - <div id="bodyContent"> - <div id="content"> - - <div class="description"> - -<p>This is the <a href="../../JSON.html">JSON</a> parser implemented as a C -extension. It can be configured to be used by setting</p> - -<pre>JSON.parser = JSON::Ext::Parser</pre> - -<p>with the method parser= in <a href="../../JSON.html">JSON</a>.</p> - - </div> - - - - - - - - - - - - - - - <!-- Method ref --> - <div class="sectiontitle">Methods</div> - <dl class="methods"> - - <dt>N</dt> - <dd> - <ul> - - - <li> - <a href="#method-c-new">new</a> - </li> - - </ul> - </dd> - - <dt>P</dt> - <dd> - <ul> - - - <li> - <a href="#method-i-parse">parse</a> - </li> - - </ul> - </dd> - - <dt>Q</dt> - <dd> - <ul> - - - <li> - <a href="#method-i-quirks_mode-3F">quirks_mode?</a> - </li> - - </ul> - </dd> - - <dt>S</dt> - <dd> - <ul> - - - <li> - <a href="#method-i-source">source</a> - </li> - - </ul> - </dd> - - </dl> - - - - - - - - - - - - - - - - - - - <!-- Methods --> - - <div class="sectiontitle">Class Public methods</div> - - <div class="method"> - <div class="title method-title" id="method-c-new"> - - <a name="method-c-new"></a><b>new(source, opts => {}) -</b> - - </div> - - - <div class="description"> - <p>Creates a new <a href="Parser.html">JSON::Ext::Parser</a> instance for the -string <em>source</em>.</p> - -<p>Creates a new <a href="Parser.html">JSON::Ext::Parser</a> instance for the -string <em>source</em>.</p> - -<p>It will be configured by the <em>opts</em> hash. <em>opts</em> can have the -following keys:</p> - -<p><em>opts</em> can have the following keys:</p> -<ul><li> -<p><strong>max_nesting</strong>: The maximum depth of nesting allowed in the -parsed data structures. Disable depth checking with :max_nesting => -false|nil|0, it defaults to 19.</p> -</li><li> -<p><strong>allow_nan</strong>: If set to true, allow NaN, Infinity and --Infinity in defiance of RFC 4627 to be parsed by the <a -href="Parser.html">Parser</a>. This option defaults to false.</p> -</li><li> -<p><strong>symbolize_names</strong>: If set to true, returns symbols for the -names (keys) in a <a href="../../JSON.html">JSON</a> object. Otherwise -strings are returned, which is also the default.</p> -</li><li> -<p><strong>create_additions</strong>: If set to false, the <a -href="Parser.html">Parser</a> doesn't create additions even if a matchin -class and create_id was found. This option defaults to true.</p> -</li><li> -<p><strong>object_class</strong>: Defaults to Hash</p> -</li><li> -<p><strong>array_class</strong>: Defaults to Array</p> -</li></ul> - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-c-new_source')" id="l_method-c-new_source">show</a> - - </p> - <div id="method-c-new_source" class="dyn-source"> - <pre>static VALUE cParser_initialize(int argc, VALUE *argv, VALUE self) -{ - VALUE source, opts; - GET_PARSER_INIT; - - if (json->Vsource) { - rb_raise(rb_eTypeError, "already initialized instance"); - } - rb_scan_args(argc, argv, "11", &source, &opts); - if (!NIL_P(opts)) { - opts = rb_convert_type(opts, T_HASH, "Hash", "to_hash"); - if (NIL_P(opts)) { - rb_raise(rb_eArgError, "opts needs to be like a hash"); - } else { - VALUE tmp = ID2SYM(i_max_nesting); - if (option_given_p(opts, tmp)) { - VALUE max_nesting = rb_hash_aref(opts, tmp); - if (RTEST(max_nesting)) { - Check_Type(max_nesting, T_FIXNUM); - json->max_nesting = FIX2INT(max_nesting); - } else { - json->max_nesting = 0; - } - } else { - json->max_nesting = 19; - } - tmp = ID2SYM(i_allow_nan); - if (option_given_p(opts, tmp)) { - json->allow_nan = RTEST(rb_hash_aref(opts, tmp)) ? 1 : 0; - } else { - json->allow_nan = 0; - } - tmp = ID2SYM(i_symbolize_names); - if (option_given_p(opts, tmp)) { - json->symbolize_names = RTEST(rb_hash_aref(opts, tmp)) ? 1 : 0; - } else { - json->symbolize_names = 0; - } - tmp = ID2SYM(i_quirks_mode); - if (option_given_p(opts, tmp)) { - VALUE quirks_mode = rb_hash_aref(opts, tmp); - json->quirks_mode = RTEST(quirks_mode) ? 1 : 0; - } else { - json->quirks_mode = 0; - } - tmp = ID2SYM(i_create_additions); - if (option_given_p(opts, tmp)) { - json->create_additions = RTEST(rb_hash_aref(opts, tmp)); - } else { - json->create_additions = 1; - } - tmp = ID2SYM(i_create_id); - if (option_given_p(opts, tmp)) { - json->create_id = rb_hash_aref(opts, tmp); - } else { - json->create_id = rb_funcall(mJSON, i_create_id, 0); - } - tmp = ID2SYM(i_object_class); - if (option_given_p(opts, tmp)) { - json->object_class = rb_hash_aref(opts, tmp); - } else { - json->object_class = Qnil; - } - tmp = ID2SYM(i_array_class); - if (option_given_p(opts, tmp)) { - json->array_class = rb_hash_aref(opts, tmp); - } else { - json->array_class = Qnil; - } - tmp = ID2SYM(i_match_string); - if (option_given_p(opts, tmp)) { - VALUE match_string = rb_hash_aref(opts, tmp); - json->match_string = RTEST(match_string) ? match_string : Qnil; - } else { - json->match_string = Qnil; - } - } - } else { - json->max_nesting = 19; - json->allow_nan = 0; - json->create_additions = 1; - json->create_id = rb_funcall(mJSON, i_create_id, 0); - json->object_class = Qnil; - json->array_class = Qnil; - } - source = rb_convert_type(source, T_STRING, "String", "to_str"); - if (!json->quirks_mode) { - source = convert_encoding(StringValue(source)); - } - json->current_nesting = 0; - json->len = RSTRING_LEN(source); - json->source = RSTRING_PTR(source);; - json->Vsource = source; - return self; -}</pre> - </div> - </div> - - </div> - - <div class="sectiontitle">Instance Public methods</div> - - <div class="method"> - <div class="title method-title" id="method-i-parse"> - - <a name="method-i-parse"></a><b>parse() -</b> - - </div> - - - <div class="description"> - <p>Parses the current <a href="../../JSON.html">JSON</a> text <em>source</em> -and returns the complete data structure as a result.</p> - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-parse_source')" id="l_method-i-parse_source">show</a> - - </p> - <div id="method-i-parse_source" class="dyn-source"> - <pre>static VALUE cParser_parse(VALUE self) -{ - GET_PARSER; - - if (json->quirks_mode) { - return cParser_parse_quirks_mode(self); - } else { - return cParser_parse_strict(self); - } -}</pre> - </div> - </div> - - </div> - - <div class="method"> - <div class="title method-title" id="method-i-quirks_mode-3F"> - - <a name="method-i-quirks_mode-3F"></a><b>quirks_mode?() -</b> - - </div> - - - <div class="description"> - <p>Returns a true, if this parser is in quirks_mode, false otherwise.</p> - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-quirks_mode-3F_source')" id="l_method-i-quirks_mode-3F_source">show</a> - - </p> - <div id="method-i-quirks_mode-3F_source" class="dyn-source"> - <pre>static VALUE cParser_quirks_mode_p(VALUE self) -{ - GET_PARSER; - return json->quirks_mode ? Qtrue : Qfalse; -}</pre> - </div> - </div> - - </div> - - <div class="method"> - <div class="title method-title" id="method-i-source"> - - <a name="method-i-source"></a><b>source() -</b> - - </div> - - - <div class="description"> - <p>Returns a copy of the current <em>source</em> string, that was used to -construct this <a href="Parser.html">Parser</a>.</p> - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-source_source')" id="l_method-i-source_source">show</a> - - </p> - <div id="method-i-source_source" class="dyn-source"> - <pre>static VALUE cParser_source(VALUE self) -{ - GET_PARSER; - return rb_str_dup(json->Vsource); -}</pre> - </div> - </div> - - </div> - </div> - </div> - </body> -</html>
\ No newline at end of file diff --git a/doc/classes/JSON/GeneratorError.html b/doc/classes/JSON/GeneratorError.html deleted file mode 100644 index b609f3b..0000000 --- a/doc/classes/JSON/GeneratorError.html +++ /dev/null @@ -1,81 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" - "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> -<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> -<head> - <title>JSON::UnparserError</title> - <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> - <link rel="stylesheet" href="../../css/reset.css" type="text/css" media="screen" /> -<link rel="stylesheet" href="../../css/main.css" type="text/css" media="screen" /> -<link rel="stylesheet" href="../../css/github.css" type="text/css" media="screen" /> -<script src="../../js/jquery-1.3.2.min.js" type="text/javascript" charset="utf-8"></script> -<script src="../../js/jquery-effect.js" type="text/javascript" charset="utf-8"></script> -<script src="../../js/main.js" type="text/javascript" charset="utf-8"></script> -<script src="../../js/highlight.pack.js" type="text/javascript" charset="utf-8"></script> - -</head> - -<body> - <div class="banner"> - - <h1> - <span class="type">Class</span> - JSON::UnparserError - - <span class="parent">< - - <a href="JSONError.html">JSON::JSONError</a> - - </span> - - </h1> - <ul class="files"> - - <li><a href="../../files/lib/json/common_rb.html">lib/json/common.rb</a></li> - - </ul> - </div> - <div id="bodyContent"> - <div id="content"> - - <div class="description"> - -<p>This exception is raised if a generator or unparser error occurs.</p> - - </div> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - <!-- Methods --> - </div> - </div> - </body> -</html>
\ No newline at end of file diff --git a/doc/classes/JSON/JSONError.html b/doc/classes/JSON/JSONError.html deleted file mode 100644 index bebf9af..0000000 --- a/doc/classes/JSON/JSONError.html +++ /dev/null @@ -1,81 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" - "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> -<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> -<head> - <title>JSON::JSONError</title> - <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> - <link rel="stylesheet" href="../../css/reset.css" type="text/css" media="screen" /> -<link rel="stylesheet" href="../../css/main.css" type="text/css" media="screen" /> -<link rel="stylesheet" href="../../css/github.css" type="text/css" media="screen" /> -<script src="../../js/jquery-1.3.2.min.js" type="text/javascript" charset="utf-8"></script> -<script src="../../js/jquery-effect.js" type="text/javascript" charset="utf-8"></script> -<script src="../../js/main.js" type="text/javascript" charset="utf-8"></script> -<script src="../../js/highlight.pack.js" type="text/javascript" charset="utf-8"></script> - -</head> - -<body> - <div class="banner"> - - <h1> - <span class="type">Class</span> - JSON::JSONError - - <span class="parent">< - - StandardError - - </span> - - </h1> - <ul class="files"> - - <li><a href="../../files/lib/json/common_rb.html">lib/json/common.rb</a></li> - - </ul> - </div> - <div id="bodyContent"> - <div id="content"> - - <div class="description"> - -<p>The base exception for <a href="../JSON.html">JSON</a> errors.</p> - - </div> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - <!-- Methods --> - </div> - </div> - </body> -</html>
\ No newline at end of file diff --git a/doc/classes/JSON/MissingUnicodeSupport.html b/doc/classes/JSON/MissingUnicodeSupport.html deleted file mode 100644 index 1928834..0000000 --- a/doc/classes/JSON/MissingUnicodeSupport.html +++ /dev/null @@ -1,82 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" - "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> -<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> -<head> - <title>JSON::MissingUnicodeSupport</title> - <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> - <link rel="stylesheet" href="../../css/reset.css" type="text/css" media="screen" /> -<link rel="stylesheet" href="../../css/main.css" type="text/css" media="screen" /> -<link rel="stylesheet" href="../../css/github.css" type="text/css" media="screen" /> -<script src="../../js/jquery-1.3.2.min.js" type="text/javascript" charset="utf-8"></script> -<script src="../../js/jquery-effect.js" type="text/javascript" charset="utf-8"></script> -<script src="../../js/main.js" type="text/javascript" charset="utf-8"></script> -<script src="../../js/highlight.pack.js" type="text/javascript" charset="utf-8"></script> - -</head> - -<body> - <div class="banner"> - - <h1> - <span class="type">Class</span> - JSON::MissingUnicodeSupport - - <span class="parent">< - - <a href="JSONError.html">JSON::JSONError</a> - - </span> - - </h1> - <ul class="files"> - - <li><a href="../../files/lib/json/common_rb.html">lib/json/common.rb</a></li> - - </ul> - </div> - <div id="bodyContent"> - <div id="content"> - - <div class="description"> - -<p>This exception is raised if the required unicode support is missing on the -system. Usually this means that the iconv library is not installed.</p> - - </div> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - <!-- Methods --> - </div> - </div> - </body> -</html>
\ No newline at end of file diff --git a/doc/classes/JSON/NestingError.html b/doc/classes/JSON/NestingError.html deleted file mode 100644 index 65d9674..0000000 --- a/doc/classes/JSON/NestingError.html +++ /dev/null @@ -1,82 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" - "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> -<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> -<head> - <title>JSON::NestingError</title> - <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> - <link rel="stylesheet" href="../../css/reset.css" type="text/css" media="screen" /> -<link rel="stylesheet" href="../../css/main.css" type="text/css" media="screen" /> -<link rel="stylesheet" href="../../css/github.css" type="text/css" media="screen" /> -<script src="../../js/jquery-1.3.2.min.js" type="text/javascript" charset="utf-8"></script> -<script src="../../js/jquery-effect.js" type="text/javascript" charset="utf-8"></script> -<script src="../../js/main.js" type="text/javascript" charset="utf-8"></script> -<script src="../../js/highlight.pack.js" type="text/javascript" charset="utf-8"></script> - -</head> - -<body> - <div class="banner"> - - <h1> - <span class="type">Class</span> - JSON::NestingError - - <span class="parent">< - - <a href="ParserError.html">JSON::ParserError</a> - - </span> - - </h1> - <ul class="files"> - - <li><a href="../../files/lib/json/common_rb.html">lib/json/common.rb</a></li> - - </ul> - </div> - <div id="bodyContent"> - <div id="content"> - - <div class="description"> - -<p>This exception is raised if the nesting of parsed data structures is too -deep.</p> - - </div> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - <!-- Methods --> - </div> - </div> - </body> -</html>
\ No newline at end of file diff --git a/doc/classes/JSON/ParserError.html b/doc/classes/JSON/ParserError.html deleted file mode 100644 index 7e05149..0000000 --- a/doc/classes/JSON/ParserError.html +++ /dev/null @@ -1,81 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" - "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> -<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> -<head> - <title>JSON::ParserError</title> - <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> - <link rel="stylesheet" href="../../css/reset.css" type="text/css" media="screen" /> -<link rel="stylesheet" href="../../css/main.css" type="text/css" media="screen" /> -<link rel="stylesheet" href="../../css/github.css" type="text/css" media="screen" /> -<script src="../../js/jquery-1.3.2.min.js" type="text/javascript" charset="utf-8"></script> -<script src="../../js/jquery-effect.js" type="text/javascript" charset="utf-8"></script> -<script src="../../js/main.js" type="text/javascript" charset="utf-8"></script> -<script src="../../js/highlight.pack.js" type="text/javascript" charset="utf-8"></script> - -</head> - -<body> - <div class="banner"> - - <h1> - <span class="type">Class</span> - JSON::ParserError - - <span class="parent">< - - <a href="JSONError.html">JSON::JSONError</a> - - </span> - - </h1> - <ul class="files"> - - <li><a href="../../files/lib/json/common_rb.html">lib/json/common.rb</a></li> - - </ul> - </div> - <div id="bodyContent"> - <div id="content"> - - <div class="description"> - -<p>This exception is raised if a parser error occurs.</p> - - </div> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - <!-- Methods --> - </div> - </div> - </body> -</html>
\ No newline at end of file diff --git a/doc/classes/JSON/Pure.html b/doc/classes/JSON/Pure.html deleted file mode 100644 index 6770d01..0000000 --- a/doc/classes/JSON/Pure.html +++ /dev/null @@ -1,96 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" - "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> -<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> -<head> - <title>JSON::Pure</title> - <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> - <link rel="stylesheet" href="../../css/reset.css" type="text/css" media="screen" /> -<link rel="stylesheet" href="../../css/main.css" type="text/css" media="screen" /> -<link rel="stylesheet" href="../../css/github.css" type="text/css" media="screen" /> -<script src="../../js/jquery-1.3.2.min.js" type="text/javascript" charset="utf-8"></script> -<script src="../../js/jquery-effect.js" type="text/javascript" charset="utf-8"></script> -<script src="../../js/main.js" type="text/javascript" charset="utf-8"></script> -<script src="../../js/highlight.pack.js" type="text/javascript" charset="utf-8"></script> - -</head> - -<body> - <div class="banner"> - - <h1> - <span class="type">Module</span> - JSON::Pure - - </h1> - <ul class="files"> - - <li><a href="../../files/lib/json/pure/generator_rb.html">lib/json/pure/generator.rb</a></li> - - <li><a href="../../files/lib/json/pure/parser_rb.html">lib/json/pure/parser.rb</a></li> - - <li><a href="../../files/lib/json/pure_rb.html">lib/json/pure.rb</a></li> - - </ul> - </div> - <div id="bodyContent"> - <div id="content"> - - <div class="description"> - -<p>This module holds all the modules/classes that implement JSON’s -functionality in pure ruby.</p> - - </div> - - - - - - - - - - - - <!-- Namespace --> - <div class="sectiontitle">Namespace</div> - <ul> - - <li> - <span class="type">MODULE</span> - <a href="Pure/Generator.html">JSON::Pure::Generator</a> - </li> - - <li> - <span class="type">CLASS</span> - <a href="Pure/Parser.html">JSON::Pure::Parser</a> - </li> - - </ul> - - - - - - - - - - - - - - - - - - - - - - <!-- Methods --> - </div> - </div> - </body> -</html>
\ No newline at end of file diff --git a/doc/classes/JSON/Pure/Generator.html b/doc/classes/JSON/Pure/Generator.html deleted file mode 100644 index b5d373b..0000000 --- a/doc/classes/JSON/Pure/Generator.html +++ /dev/null @@ -1,85 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" - "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> -<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> -<head> - <title>JSON::Pure::Generator</title> - <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> - <link rel="stylesheet" href="../../../css/reset.css" type="text/css" media="screen" /> -<link rel="stylesheet" href="../../../css/main.css" type="text/css" media="screen" /> -<link rel="stylesheet" href="../../../css/github.css" type="text/css" media="screen" /> -<script src="../../../js/jquery-1.3.2.min.js" type="text/javascript" charset="utf-8"></script> -<script src="../../../js/jquery-effect.js" type="text/javascript" charset="utf-8"></script> -<script src="../../../js/main.js" type="text/javascript" charset="utf-8"></script> -<script src="../../../js/highlight.pack.js" type="text/javascript" charset="utf-8"></script> - -</head> - -<body> - <div class="banner"> - - <h1> - <span class="type">Module</span> - JSON::Pure::Generator - - </h1> - <ul class="files"> - - <li><a href="../../../files/lib/json/pure/generator_rb.html">lib/json/pure/generator.rb</a></li> - - </ul> - </div> - <div id="bodyContent"> - <div id="content"> - - - - - - - - - - - - <!-- Namespace --> - <div class="sectiontitle">Namespace</div> - <ul> - - <li> - <span class="type">MODULE</span> - <a href="Generator/GeneratorMethods.html">JSON::Pure::Generator::GeneratorMethods</a> - </li> - - <li> - <span class="type">CLASS</span> - <a href="Generator/State.html">JSON::Pure::Generator::State</a> - </li> - - </ul> - - - - - - - - - - - - - - - - - - - - - - <!-- Methods --> - </div> - </div> - </body> -</html>
\ No newline at end of file diff --git a/doc/classes/JSON/Pure/Generator/GeneratorMethods.html b/doc/classes/JSON/Pure/Generator/GeneratorMethods.html deleted file mode 100644 index 2e09ad8..0000000 --- a/doc/classes/JSON/Pure/Generator/GeneratorMethods.html +++ /dev/null @@ -1,120 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" - "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> -<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> -<head> - <title>JSON::Pure::Generator::GeneratorMethods</title> - <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> - <link rel="stylesheet" href="../../../../css/reset.css" type="text/css" media="screen" /> -<link rel="stylesheet" href="../../../../css/main.css" type="text/css" media="screen" /> -<link rel="stylesheet" href="../../../../css/github.css" type="text/css" media="screen" /> -<script src="../../../../js/jquery-1.3.2.min.js" type="text/javascript" charset="utf-8"></script> -<script src="../../../../js/jquery-effect.js" type="text/javascript" charset="utf-8"></script> -<script src="../../../../js/main.js" type="text/javascript" charset="utf-8"></script> -<script src="../../../../js/highlight.pack.js" type="text/javascript" charset="utf-8"></script> - -</head> - -<body> - <div class="banner"> - - <h1> - <span class="type">Module</span> - JSON::Pure::Generator::GeneratorMethods - - </h1> - <ul class="files"> - - <li><a href="../../../../files/lib/json/pure/generator_rb.html">lib/json/pure/generator.rb</a></li> - - </ul> - </div> - <div id="bodyContent"> - <div id="content"> - - - - - - - - - - - - <!-- Namespace --> - <div class="sectiontitle">Namespace</div> - <ul> - - <li> - <span class="type">MODULE</span> - <a href="GeneratorMethods/Array.html">JSON::Pure::Generator::GeneratorMethods::Array</a> - </li> - - <li> - <span class="type">MODULE</span> - <a href="GeneratorMethods/FalseClass.html">JSON::Pure::Generator::GeneratorMethods::FalseClass</a> - </li> - - <li> - <span class="type">MODULE</span> - <a href="GeneratorMethods/Float.html">JSON::Pure::Generator::GeneratorMethods::Float</a> - </li> - - <li> - <span class="type">MODULE</span> - <a href="GeneratorMethods/Hash.html">JSON::Pure::Generator::GeneratorMethods::Hash</a> - </li> - - <li> - <span class="type">MODULE</span> - <a href="GeneratorMethods/Integer.html">JSON::Pure::Generator::GeneratorMethods::Integer</a> - </li> - - <li> - <span class="type">MODULE</span> - <a href="GeneratorMethods/NilClass.html">JSON::Pure::Generator::GeneratorMethods::NilClass</a> - </li> - - <li> - <span class="type">MODULE</span> - <a href="GeneratorMethods/Object.html">JSON::Pure::Generator::GeneratorMethods::Object</a> - </li> - - <li> - <span class="type">MODULE</span> - <a href="GeneratorMethods/String.html">JSON::Pure::Generator::GeneratorMethods::String</a> - </li> - - <li> - <span class="type">MODULE</span> - <a href="GeneratorMethods/TrueClass.html">JSON::Pure::Generator::GeneratorMethods::TrueClass</a> - </li> - - </ul> - - - - - - - - - - - - - - - - - - - - - - <!-- Methods --> - </div> - </div> - </body> -</html>
\ No newline at end of file diff --git a/doc/classes/JSON/Pure/Generator/GeneratorMethods/Array.html b/doc/classes/JSON/Pure/Generator/GeneratorMethods/Array.html deleted file mode 100644 index 3ebf116..0000000 --- a/doc/classes/JSON/Pure/Generator/GeneratorMethods/Array.html +++ /dev/null @@ -1,129 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" - "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> -<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> -<head> - <title>JSON::Pure::Generator::GeneratorMethods::Array</title> - <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> - <link rel="stylesheet" href="../../../../../css/reset.css" type="text/css" media="screen" /> -<link rel="stylesheet" href="../../../../../css/main.css" type="text/css" media="screen" /> -<link rel="stylesheet" href="../../../../../css/github.css" type="text/css" media="screen" /> -<script src="../../../../../js/jquery-1.3.2.min.js" type="text/javascript" charset="utf-8"></script> -<script src="../../../../../js/jquery-effect.js" type="text/javascript" charset="utf-8"></script> -<script src="../../../../../js/main.js" type="text/javascript" charset="utf-8"></script> -<script src="../../../../../js/highlight.pack.js" type="text/javascript" charset="utf-8"></script> - -</head> - -<body> - <div class="banner"> - - <h1> - <span class="type">Module</span> - JSON::Pure::Generator::GeneratorMethods::Array - - </h1> - <ul class="files"> - - <li><a href="../../../../../files/lib/json/pure/generator_rb.html">lib/json/pure/generator.rb</a></li> - - </ul> - </div> - <div id="bodyContent"> - <div id="content"> - - - - - - - - - - - - - - - <!-- Method ref --> - <div class="sectiontitle">Methods</div> - <dl class="methods"> - - <dt>T</dt> - <dd> - <ul> - - - <li> - <a href="#method-i-to_json">to_json</a> - </li> - - </ul> - </dd> - - </dl> - - - - - - - - - - - - - - - - - - - <!-- Methods --> - - <div class="sectiontitle">Instance Public methods</div> - - <div class="method"> - <div class="title method-title" id="method-i-to_json"> - - <a name="method-i-to_json"></a><b>to_json</b>(state = nil, *) - - </div> - - - <div class="description"> - <p>Returns a <a href="../../../../JSON.html">JSON</a> string containing a <a -href="../../../../JSON.html">JSON</a> array, that is unparsed from this <a -href="Array.html">Array</a> instance. <em>state</em> is a JSON::State -object, that can also be used to configure the produced <a -href="../../../../JSON.html">JSON</a> string output further.</p> - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-to_json_source')" id="l_method-i-to_json_source">show</a> - - </p> - <div id="method-i-to_json_source" class="dyn-source"> - <pre><span class="ruby-comment"># File lib/json/pure/generator.rb, line 332</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">to_json</span>(<span class="ruby-identifier">state</span> = <span class="ruby-keyword">nil</span>, *) - <span class="ruby-identifier">state</span> = <span class="ruby-constant">State</span>.<span class="ruby-identifier">from_state</span>(<span class="ruby-identifier">state</span>) - <span class="ruby-identifier">state</span>.<span class="ruby-identifier">check_max_nesting</span> - <span class="ruby-identifier">json_transform</span>(<span class="ruby-identifier">state</span>) -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - </div> - </div> - </body> -</html>
\ No newline at end of file diff --git a/doc/classes/JSON/Pure/Generator/GeneratorMethods/FalseClass.html b/doc/classes/JSON/Pure/Generator/GeneratorMethods/FalseClass.html deleted file mode 100644 index bec78de..0000000 --- a/doc/classes/JSON/Pure/Generator/GeneratorMethods/FalseClass.html +++ /dev/null @@ -1,122 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" - "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> -<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> -<head> - <title>JSON::Pure::Generator::GeneratorMethods::FalseClass</title> - <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> - <link rel="stylesheet" href="../../../../../css/reset.css" type="text/css" media="screen" /> -<link rel="stylesheet" href="../../../../../css/main.css" type="text/css" media="screen" /> -<link rel="stylesheet" href="../../../../../css/github.css" type="text/css" media="screen" /> -<script src="../../../../../js/jquery-1.3.2.min.js" type="text/javascript" charset="utf-8"></script> -<script src="../../../../../js/jquery-effect.js" type="text/javascript" charset="utf-8"></script> -<script src="../../../../../js/main.js" type="text/javascript" charset="utf-8"></script> -<script src="../../../../../js/highlight.pack.js" type="text/javascript" charset="utf-8"></script> - -</head> - -<body> - <div class="banner"> - - <h1> - <span class="type">Module</span> - JSON::Pure::Generator::GeneratorMethods::FalseClass - - </h1> - <ul class="files"> - - <li><a href="../../../../../files/lib/json/pure/generator_rb.html">lib/json/pure/generator.rb</a></li> - - </ul> - </div> - <div id="bodyContent"> - <div id="content"> - - - - - - - - - - - - - - - <!-- Method ref --> - <div class="sectiontitle">Methods</div> - <dl class="methods"> - - <dt>T</dt> - <dd> - <ul> - - - <li> - <a href="#method-i-to_json">to_json</a> - </li> - - </ul> - </dd> - - </dl> - - - - - - - - - - - - - - - - - - - <!-- Methods --> - - <div class="sectiontitle">Instance Public methods</div> - - <div class="method"> - <div class="title method-title" id="method-i-to_json"> - - <a name="method-i-to_json"></a><b>to_json</b>(*) - - </div> - - - <div class="description"> - <p>Returns a <a href="../../../../JSON.html">JSON</a> string for false: -‘false’.</p> - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-to_json_source')" id="l_method-i-to_json_source">show</a> - - </p> - <div id="method-i-to_json_source" class="dyn-source"> - <pre><span class="ruby-comment"># File lib/json/pure/generator.rb, line 462</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">to_json</span>(*) <span class="ruby-string">'false'</span> <span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - </div> - </div> - </body> -</html>
\ No newline at end of file diff --git a/doc/classes/JSON/Pure/Generator/GeneratorMethods/Float.html b/doc/classes/JSON/Pure/Generator/GeneratorMethods/Float.html deleted file mode 100644 index 96144e8..0000000 --- a/doc/classes/JSON/Pure/Generator/GeneratorMethods/Float.html +++ /dev/null @@ -1,140 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" - "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> -<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> -<head> - <title>JSON::Pure::Generator::GeneratorMethods::Float</title> - <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> - <link rel="stylesheet" href="../../../../../css/reset.css" type="text/css" media="screen" /> -<link rel="stylesheet" href="../../../../../css/main.css" type="text/css" media="screen" /> -<link rel="stylesheet" href="../../../../../css/github.css" type="text/css" media="screen" /> -<script src="../../../../../js/jquery-1.3.2.min.js" type="text/javascript" charset="utf-8"></script> -<script src="../../../../../js/jquery-effect.js" type="text/javascript" charset="utf-8"></script> -<script src="../../../../../js/main.js" type="text/javascript" charset="utf-8"></script> -<script src="../../../../../js/highlight.pack.js" type="text/javascript" charset="utf-8"></script> - -</head> - -<body> - <div class="banner"> - - <h1> - <span class="type">Module</span> - JSON::Pure::Generator::GeneratorMethods::Float - - </h1> - <ul class="files"> - - <li><a href="../../../../../files/lib/json/pure/generator_rb.html">lib/json/pure/generator.rb</a></li> - - </ul> - </div> - <div id="bodyContent"> - <div id="content"> - - - - - - - - - - - - - - - <!-- Method ref --> - <div class="sectiontitle">Methods</div> - <dl class="methods"> - - <dt>T</dt> - <dd> - <ul> - - - <li> - <a href="#method-i-to_json">to_json</a> - </li> - - </ul> - </dd> - - </dl> - - - - - - - - - - - - - - - - - - - <!-- Methods --> - - <div class="sectiontitle">Instance Public methods</div> - - <div class="method"> - <div class="title method-title" id="method-i-to_json"> - - <a name="method-i-to_json"></a><b>to_json</b>(state = nil, *) - - </div> - - - <div class="description"> - <p>Returns a <a href="../../../../JSON.html">JSON</a> string representation -for this <a href="Float.html">Float</a> number.</p> - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-to_json_source')" id="l_method-i-to_json_source">show</a> - - </p> - <div id="method-i-to_json_source" class="dyn-source"> - <pre><span class="ruby-comment"># File lib/json/pure/generator.rb, line 368</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">to_json</span>(<span class="ruby-identifier">state</span> = <span class="ruby-keyword">nil</span>, *) - <span class="ruby-identifier">state</span> = <span class="ruby-constant">State</span>.<span class="ruby-identifier">from_state</span>(<span class="ruby-identifier">state</span>) - <span class="ruby-keyword">case</span> - <span class="ruby-keyword">when</span> <span class="ruby-identifier">infinite?</span> - <span class="ruby-keyword">if</span> <span class="ruby-identifier">state</span>.<span class="ruby-identifier">allow_nan?</span> - <span class="ruby-identifier">to_s</span> - <span class="ruby-keyword">else</span> - <span class="ruby-identifier">raise</span> <span class="ruby-constant">GeneratorError</span>, <span class="ruby-node">"#{self} not allowed in JSON"</span> - <span class="ruby-keyword">end</span> - <span class="ruby-keyword">when</span> <span class="ruby-identifier">nan?</span> - <span class="ruby-keyword">if</span> <span class="ruby-identifier">state</span>.<span class="ruby-identifier">allow_nan?</span> - <span class="ruby-identifier">to_s</span> - <span class="ruby-keyword">else</span> - <span class="ruby-identifier">raise</span> <span class="ruby-constant">GeneratorError</span>, <span class="ruby-node">"#{self} not allowed in JSON"</span> - <span class="ruby-keyword">end</span> - <span class="ruby-keyword">else</span> - <span class="ruby-identifier">to_s</span> - <span class="ruby-keyword">end</span> -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - </div> - </div> - </body> -</html>
\ No newline at end of file diff --git a/doc/classes/JSON/Pure/Generator/GeneratorMethods/Hash.html b/doc/classes/JSON/Pure/Generator/GeneratorMethods/Hash.html deleted file mode 100644 index 0167add..0000000 --- a/doc/classes/JSON/Pure/Generator/GeneratorMethods/Hash.html +++ /dev/null @@ -1,130 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" - "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> -<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> -<head> - <title>JSON::Pure::Generator::GeneratorMethods::Hash</title> - <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> - <link rel="stylesheet" href="../../../../../css/reset.css" type="text/css" media="screen" /> -<link rel="stylesheet" href="../../../../../css/main.css" type="text/css" media="screen" /> -<link rel="stylesheet" href="../../../../../css/github.css" type="text/css" media="screen" /> -<script src="../../../../../js/jquery-1.3.2.min.js" type="text/javascript" charset="utf-8"></script> -<script src="../../../../../js/jquery-effect.js" type="text/javascript" charset="utf-8"></script> -<script src="../../../../../js/main.js" type="text/javascript" charset="utf-8"></script> -<script src="../../../../../js/highlight.pack.js" type="text/javascript" charset="utf-8"></script> - -</head> - -<body> - <div class="banner"> - - <h1> - <span class="type">Module</span> - JSON::Pure::Generator::GeneratorMethods::Hash - - </h1> - <ul class="files"> - - <li><a href="../../../../../files/lib/json/pure/generator_rb.html">lib/json/pure/generator.rb</a></li> - - </ul> - </div> - <div id="bodyContent"> - <div id="content"> - - - - - - - - - - - - - - - <!-- Method ref --> - <div class="sectiontitle">Methods</div> - <dl class="methods"> - - <dt>T</dt> - <dd> - <ul> - - - <li> - <a href="#method-i-to_json">to_json</a> - </li> - - </ul> - </dd> - - </dl> - - - - - - - - - - - - - - - - - - - <!-- Methods --> - - <div class="sectiontitle">Instance Public methods</div> - - <div class="method"> - <div class="title method-title" id="method-i-to_json"> - - <a name="method-i-to_json"></a><b>to_json</b>(state = nil, *) - - </div> - - - <div class="description"> - <p>Returns a <a href="../../../../JSON.html">JSON</a> string containing a <a -href="../../../../JSON.html">JSON</a> object, that is unparsed from this <a -href="Hash.html">Hash</a> instance. <em>state</em> is a JSON::State object, -that can also be used to configure the produced <a -href="../../../../JSON.html">JSON</a> string output further. <em>depth</em> -is used to find out nesting depth, to indent accordingly.</p> - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-to_json_source')" id="l_method-i-to_json_source">show</a> - - </p> - <div id="method-i-to_json_source" class="dyn-source"> - <pre><span class="ruby-comment"># File lib/json/pure/generator.rb, line 288</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">to_json</span>(<span class="ruby-identifier">state</span> = <span class="ruby-keyword">nil</span>, *) - <span class="ruby-identifier">state</span> = <span class="ruby-constant">State</span>.<span class="ruby-identifier">from_state</span>(<span class="ruby-identifier">state</span>) - <span class="ruby-identifier">state</span>.<span class="ruby-identifier">check_max_nesting</span> - <span class="ruby-identifier">json_transform</span>(<span class="ruby-identifier">state</span>) -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - </div> - </div> - </body> -</html>
\ No newline at end of file diff --git a/doc/classes/JSON/Pure/Generator/GeneratorMethods/Integer.html b/doc/classes/JSON/Pure/Generator/GeneratorMethods/Integer.html deleted file mode 100644 index c847c8c..0000000 --- a/doc/classes/JSON/Pure/Generator/GeneratorMethods/Integer.html +++ /dev/null @@ -1,122 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" - "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> -<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> -<head> - <title>JSON::Pure::Generator::GeneratorMethods::Integer</title> - <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> - <link rel="stylesheet" href="../../../../../css/reset.css" type="text/css" media="screen" /> -<link rel="stylesheet" href="../../../../../css/main.css" type="text/css" media="screen" /> -<link rel="stylesheet" href="../../../../../css/github.css" type="text/css" media="screen" /> -<script src="../../../../../js/jquery-1.3.2.min.js" type="text/javascript" charset="utf-8"></script> -<script src="../../../../../js/jquery-effect.js" type="text/javascript" charset="utf-8"></script> -<script src="../../../../../js/main.js" type="text/javascript" charset="utf-8"></script> -<script src="../../../../../js/highlight.pack.js" type="text/javascript" charset="utf-8"></script> - -</head> - -<body> - <div class="banner"> - - <h1> - <span class="type">Module</span> - JSON::Pure::Generator::GeneratorMethods::Integer - - </h1> - <ul class="files"> - - <li><a href="../../../../../files/lib/json/pure/generator_rb.html">lib/json/pure/generator.rb</a></li> - - </ul> - </div> - <div id="bodyContent"> - <div id="content"> - - - - - - - - - - - - - - - <!-- Method ref --> - <div class="sectiontitle">Methods</div> - <dl class="methods"> - - <dt>T</dt> - <dd> - <ul> - - - <li> - <a href="#method-i-to_json">to_json</a> - </li> - - </ul> - </dd> - - </dl> - - - - - - - - - - - - - - - - - - - <!-- Methods --> - - <div class="sectiontitle">Instance Public methods</div> - - <div class="method"> - <div class="title method-title" id="method-i-to_json"> - - <a name="method-i-to_json"></a><b>to_json</b>(*) - - </div> - - - <div class="description"> - <p>Returns a <a href="../../../../JSON.html">JSON</a> string representation -for this <a href="Integer.html">Integer</a> number.</p> - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-to_json_source')" id="l_method-i-to_json_source">show</a> - - </p> - <div id="method-i-to_json_source" class="dyn-source"> - <pre><span class="ruby-comment"># File lib/json/pure/generator.rb, line 363</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">to_json</span>(*) <span class="ruby-identifier">to_s</span> <span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - </div> - </div> - </body> -</html>
\ No newline at end of file diff --git a/doc/classes/JSON/Pure/Generator/GeneratorMethods/NilClass.html b/doc/classes/JSON/Pure/Generator/GeneratorMethods/NilClass.html deleted file mode 100644 index a9716a2..0000000 --- a/doc/classes/JSON/Pure/Generator/GeneratorMethods/NilClass.html +++ /dev/null @@ -1,121 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" - "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> -<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> -<head> - <title>JSON::Pure::Generator::GeneratorMethods::NilClass</title> - <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> - <link rel="stylesheet" href="../../../../../css/reset.css" type="text/css" media="screen" /> -<link rel="stylesheet" href="../../../../../css/main.css" type="text/css" media="screen" /> -<link rel="stylesheet" href="../../../../../css/github.css" type="text/css" media="screen" /> -<script src="../../../../../js/jquery-1.3.2.min.js" type="text/javascript" charset="utf-8"></script> -<script src="../../../../../js/jquery-effect.js" type="text/javascript" charset="utf-8"></script> -<script src="../../../../../js/main.js" type="text/javascript" charset="utf-8"></script> -<script src="../../../../../js/highlight.pack.js" type="text/javascript" charset="utf-8"></script> - -</head> - -<body> - <div class="banner"> - - <h1> - <span class="type">Module</span> - JSON::Pure::Generator::GeneratorMethods::NilClass - - </h1> - <ul class="files"> - - <li><a href="../../../../../files/lib/json/pure/generator_rb.html">lib/json/pure/generator.rb</a></li> - - </ul> - </div> - <div id="bodyContent"> - <div id="content"> - - - - - - - - - - - - - - - <!-- Method ref --> - <div class="sectiontitle">Methods</div> - <dl class="methods"> - - <dt>T</dt> - <dd> - <ul> - - - <li> - <a href="#method-i-to_json">to_json</a> - </li> - - </ul> - </dd> - - </dl> - - - - - - - - - - - - - - - - - - - <!-- Methods --> - - <div class="sectiontitle">Instance Public methods</div> - - <div class="method"> - <div class="title method-title" id="method-i-to_json"> - - <a name="method-i-to_json"></a><b>to_json</b>(*) - - </div> - - - <div class="description"> - <p>Returns a <a href="../../../../JSON.html">JSON</a> string for nil: ‘null’.</p> - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-to_json_source')" id="l_method-i-to_json_source">show</a> - - </p> - <div id="method-i-to_json_source" class="dyn-source"> - <pre><span class="ruby-comment"># File lib/json/pure/generator.rb, line 467</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">to_json</span>(*) <span class="ruby-string">'null'</span> <span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - </div> - </div> - </body> -</html>
\ No newline at end of file diff --git a/doc/classes/JSON/Pure/Generator/GeneratorMethods/Object.html b/doc/classes/JSON/Pure/Generator/GeneratorMethods/Object.html deleted file mode 100644 index edb4d0f..0000000 --- a/doc/classes/JSON/Pure/Generator/GeneratorMethods/Object.html +++ /dev/null @@ -1,125 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" - "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> -<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> -<head> - <title>JSON::Pure::Generator::GeneratorMethods::Object</title> - <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> - <link rel="stylesheet" href="../../../../../css/reset.css" type="text/css" media="screen" /> -<link rel="stylesheet" href="../../../../../css/main.css" type="text/css" media="screen" /> -<link rel="stylesheet" href="../../../../../css/github.css" type="text/css" media="screen" /> -<script src="../../../../../js/jquery-1.3.2.min.js" type="text/javascript" charset="utf-8"></script> -<script src="../../../../../js/jquery-effect.js" type="text/javascript" charset="utf-8"></script> -<script src="../../../../../js/main.js" type="text/javascript" charset="utf-8"></script> -<script src="../../../../../js/highlight.pack.js" type="text/javascript" charset="utf-8"></script> - -</head> - -<body> - <div class="banner"> - - <h1> - <span class="type">Module</span> - JSON::Pure::Generator::GeneratorMethods::Object - - </h1> - <ul class="files"> - - <li><a href="../../../../../files/lib/json/pure/generator_rb.html">lib/json/pure/generator.rb</a></li> - - </ul> - </div> - <div id="bodyContent"> - <div id="content"> - - - - - - - - - - - - - - - <!-- Method ref --> - <div class="sectiontitle">Methods</div> - <dl class="methods"> - - <dt>T</dt> - <dd> - <ul> - - - <li> - <a href="#method-i-to_json">to_json</a> - </li> - - </ul> - </dd> - - </dl> - - - - - - - - - - - - - - - - - - - <!-- Methods --> - - <div class="sectiontitle">Instance Public methods</div> - - <div class="method"> - <div class="title method-title" id="method-i-to_json"> - - <a name="method-i-to_json"></a><b>to_json</b>(*) - - </div> - - - <div class="description"> - <p>Converts this object to a string (calling to_s), converts it to a <a -href="../../../../JSON.html">JSON</a> string, and returns the result. This -is a fallback, if no special method <a -href="Object.html#method-i-to_json">to_json</a> was defined for some -object.</p> - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-to_json_source')" id="l_method-i-to_json_source">show</a> - - </p> - <div id="method-i-to_json_source" class="dyn-source"> - <pre><span class="ruby-comment"># File lib/json/pure/generator.rb, line 279</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">to_json</span>(*) <span class="ruby-identifier">to_s</span>.<span class="ruby-identifier">to_json</span> <span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - </div> - </div> - </body> -</html>
\ No newline at end of file diff --git a/doc/classes/JSON/Pure/Generator/GeneratorMethods/String.html b/doc/classes/JSON/Pure/Generator/GeneratorMethods/String.html deleted file mode 100644 index 9dba782..0000000 --- a/doc/classes/JSON/Pure/Generator/GeneratorMethods/String.html +++ /dev/null @@ -1,283 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" - "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> -<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> -<head> - <title>JSON::Pure::Generator::GeneratorMethods::String</title> - <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> - <link rel="stylesheet" href="../../../../../css/reset.css" type="text/css" media="screen" /> -<link rel="stylesheet" href="../../../../../css/main.css" type="text/css" media="screen" /> -<link rel="stylesheet" href="../../../../../css/github.css" type="text/css" media="screen" /> -<script src="../../../../../js/jquery-1.3.2.min.js" type="text/javascript" charset="utf-8"></script> -<script src="../../../../../js/jquery-effect.js" type="text/javascript" charset="utf-8"></script> -<script src="../../../../../js/main.js" type="text/javascript" charset="utf-8"></script> -<script src="../../../../../js/highlight.pack.js" type="text/javascript" charset="utf-8"></script> - -</head> - -<body> - <div class="banner"> - - <h1> - <span class="type">Module</span> - JSON::Pure::Generator::GeneratorMethods::String - - </h1> - <ul class="files"> - - <li><a href="../../../../../files/lib/json/pure/generator_rb.html">lib/json/pure/generator.rb</a></li> - - </ul> - </div> - <div id="bodyContent"> - <div id="content"> - - - - - - - - - - - - <!-- Namespace --> - <div class="sectiontitle">Namespace</div> - <ul> - - <li> - <span class="type">MODULE</span> - <a href="String/Extend.html">JSON::Pure::Generator::GeneratorMethods::String::Extend</a> - </li> - - </ul> - - - - - <!-- Method ref --> - <div class="sectiontitle">Methods</div> - <dl class="methods"> - - <dt>I</dt> - <dd> - <ul> - - - <li> - <a href="#method-c-included">included</a> - </li> - - </ul> - </dd> - - <dt>T</dt> - <dd> - <ul> - - - <li> - <a href="#method-i-to_json">to_json</a>, - </li> - - - <li> - <a href="#method-i-to_json_raw">to_json_raw</a>, - </li> - - - <li> - <a href="#method-i-to_json_raw_object">to_json_raw_object</a> - </li> - - </ul> - </dd> - - </dl> - - - - - - - - - - - - - - - - - - - <!-- Methods --> - - <div class="sectiontitle">Class Public methods</div> - - <div class="method"> - <div class="title method-title" id="method-c-included"> - - <a name="method-c-included"></a><b>included</b>(modul) - - </div> - - - <div class="description"> - <p>Extends <em>modul</em> with the <a -href="String/Extend.html">String::Extend</a> module.</p> - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-c-included_source')" id="l_method-c-included_source">show</a> - - </p> - <div id="method-c-included_source" class="dyn-source"> - <pre><span class="ruby-comment"># File lib/json/pure/generator.rb, line 433</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">self</span>.<span class="ruby-identifier">included</span>(<span class="ruby-identifier">modul</span>) - <span class="ruby-identifier">modul</span>.<span class="ruby-identifier">extend</span> <span class="ruby-constant">Extend</span> -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - - <div class="sectiontitle">Instance Public methods</div> - - <div class="method"> - <div class="title method-title" id="method-i-to_json"> - - <a name="method-i-to_json"></a><b>to_json</b>(state = nil, *args) - - </div> - - - <div class="description"> - <p>This string should be encoded with UTF-8 A call to this method returns a <a -href="../../../../JSON.html">JSON</a> string encoded with UTF16 big endian -characters as u????.</p> - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-to_json_source')" id="l_method-i-to_json_source">show</a> - - </p> - <div id="method-i-to_json_source" class="dyn-source"> - <pre><span class="ruby-comment"># File lib/json/pure/generator.rb, line 394</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">to_json</span>(<span class="ruby-identifier">state</span> = <span class="ruby-keyword">nil</span>, *<span class="ruby-identifier">args</span>) - <span class="ruby-identifier">state</span> = <span class="ruby-constant">State</span>.<span class="ruby-identifier">from_state</span>(<span class="ruby-identifier">state</span>) - <span class="ruby-keyword">if</span> <span class="ruby-identifier">encoding</span> <span class="ruby-operator">==</span> <span class="ruby-operator">::</span><span class="ruby-constant">Encoding</span><span class="ruby-operator">::</span><span class="ruby-constant">UTF_8</span> - <span class="ruby-identifier">string</span> = <span class="ruby-keyword">self</span> - <span class="ruby-keyword">else</span> - <span class="ruby-identifier">string</span> = <span class="ruby-identifier">encode</span>(<span class="ruby-operator">::</span><span class="ruby-constant">Encoding</span><span class="ruby-operator">::</span><span class="ruby-constant">UTF_8</span>) - <span class="ruby-keyword">end</span> - <span class="ruby-keyword">if</span> <span class="ruby-identifier">state</span>.<span class="ruby-identifier">ascii_only?</span> - <span class="ruby-string">'"'</span> <span class="ruby-operator"><<</span> <span class="ruby-constant">JSON</span>.<span class="ruby-identifier">utf8_to_json_ascii</span>(<span class="ruby-identifier">string</span>) <span class="ruby-operator"><<</span> <span class="ruby-string">'"'</span> - <span class="ruby-keyword">else</span> - <span class="ruby-string">'"'</span> <span class="ruby-operator"><<</span> <span class="ruby-constant">JSON</span>.<span class="ruby-identifier">utf8_to_json</span>(<span class="ruby-identifier">string</span>) <span class="ruby-operator"><<</span> <span class="ruby-string">'"'</span> - <span class="ruby-keyword">end</span> -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - - <div class="method"> - <div class="title method-title" id="method-i-to_json_raw"> - - <a name="method-i-to_json_raw"></a><b>to_json_raw</b>(*args) - - </div> - - - <div class="description"> - <p>This method creates a <a href="../../../../JSON.html">JSON</a> text from -the result of a call to <a -href="String.html#method-i-to_json_raw_object">#to_json_raw_object</a> of -this <a href="String.html">String</a>.</p> - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-to_json_raw_source')" id="l_method-i-to_json_raw_source">show</a> - - </p> - <div id="method-i-to_json_raw_source" class="dyn-source"> - <pre><span class="ruby-comment"># File lib/json/pure/generator.rb, line 450</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">to_json_raw</span>(*<span class="ruby-identifier">args</span>) - <span class="ruby-identifier">to_json_raw_object</span>.<span class="ruby-identifier">to_json</span>(*<span class="ruby-identifier">args</span>) -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - - <div class="method"> - <div class="title method-title" id="method-i-to_json_raw_object"> - - <a name="method-i-to_json_raw_object"></a><b>to_json_raw_object</b>() - - </div> - - - <div class="description"> - <p>This method creates a raw object hash, that can be nested into other data -structures and will be unparsed as a raw string. This method should be -used, if you want to convert raw strings to <a -href="../../../../JSON.html">JSON</a> instead of UTF-8 strings, e. g. -binary data.</p> - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-to_json_raw_object_source')" id="l_method-i-to_json_raw_object_source">show</a> - - </p> - <div id="method-i-to_json_raw_object_source" class="dyn-source"> - <pre><span class="ruby-comment"># File lib/json/pure/generator.rb, line 441</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">to_json_raw_object</span> - { - <span class="ruby-constant">JSON</span>.<span class="ruby-identifier">create_id</span> =<span class="ruby-operator">></span> <span class="ruby-keyword">self</span>.<span class="ruby-identifier">class</span>.<span class="ruby-identifier">name</span>, - <span class="ruby-string">'raw'</span> =<span class="ruby-operator">></span> <span class="ruby-keyword">self</span>.<span class="ruby-identifier">unpack</span>(<span class="ruby-string">'C*'</span>), - } -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - </div> - </div> - </body> -</html>
\ No newline at end of file diff --git a/doc/classes/JSON/Pure/Generator/GeneratorMethods/String/Extend.html b/doc/classes/JSON/Pure/Generator/GeneratorMethods/String/Extend.html deleted file mode 100644 index 24e8a88..0000000 --- a/doc/classes/JSON/Pure/Generator/GeneratorMethods/String/Extend.html +++ /dev/null @@ -1,132 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" - "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> -<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> -<head> - <title>JSON::Pure::Generator::GeneratorMethods::String::Extend</title> - <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> - <link rel="stylesheet" href="../../../../../../css/reset.css" type="text/css" media="screen" /> -<link rel="stylesheet" href="../../../../../../css/main.css" type="text/css" media="screen" /> -<link rel="stylesheet" href="../../../../../../css/github.css" type="text/css" media="screen" /> -<script src="../../../../../../js/jquery-1.3.2.min.js" type="text/javascript" charset="utf-8"></script> -<script src="../../../../../../js/jquery-effect.js" type="text/javascript" charset="utf-8"></script> -<script src="../../../../../../js/main.js" type="text/javascript" charset="utf-8"></script> -<script src="../../../../../../js/highlight.pack.js" type="text/javascript" charset="utf-8"></script> - -</head> - -<body> - <div class="banner"> - - <h1> - <span class="type">Module</span> - JSON::Pure::Generator::GeneratorMethods::String::Extend - - </h1> - <ul class="files"> - - <li><a href="../../../../../../files/lib/json/pure/generator_rb.html">lib/json/pure/generator.rb</a></li> - - </ul> - </div> - <div id="bodyContent"> - <div id="content"> - - <div class="description"> - -<p>Module that holds the extinding methods if, the <a -href="../String.html">String</a> module is included.</p> - - </div> - - - - - - - - - - - - - - - <!-- Method ref --> - <div class="sectiontitle">Methods</div> - <dl class="methods"> - - <dt>J</dt> - <dd> - <ul> - - - <li> - <a href="#method-i-json_create">json_create</a> - </li> - - </ul> - </dd> - - </dl> - - - - - - - - - - - - - - - - - - - <!-- Methods --> - - <div class="sectiontitle">Instance Public methods</div> - - <div class="method"> - <div class="title method-title" id="method-i-json_create"> - - <a name="method-i-json_create"></a><b>json_create</b>(o) - - </div> - - - <div class="description"> - <p>Raw Strings are <a href="../../../../../JSON.html">JSON</a> Objects (the -raw bytes are stored in an array for the key “raw”). The Ruby <a -href="../String.html">String</a> can be created by this module method.</p> - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-json_create_source')" id="l_method-i-json_create_source">show</a> - - </p> - <div id="method-i-json_create_source" class="dyn-source"> - <pre><span class="ruby-comment"># File lib/json/pure/generator.rb, line 427</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">json_create</span>(<span class="ruby-identifier">o</span>) - <span class="ruby-identifier">o</span>[<span class="ruby-string">'raw'</span>].<span class="ruby-identifier">pack</span>(<span class="ruby-string">'C*'</span>) -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - </div> - </div> - </body> -</html>
\ No newline at end of file diff --git a/doc/classes/JSON/Pure/Generator/GeneratorMethods/TrueClass.html b/doc/classes/JSON/Pure/Generator/GeneratorMethods/TrueClass.html deleted file mode 100644 index c949d68..0000000 --- a/doc/classes/JSON/Pure/Generator/GeneratorMethods/TrueClass.html +++ /dev/null @@ -1,121 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" - "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> -<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> -<head> - <title>JSON::Pure::Generator::GeneratorMethods::TrueClass</title> - <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> - <link rel="stylesheet" href="../../../../../css/reset.css" type="text/css" media="screen" /> -<link rel="stylesheet" href="../../../../../css/main.css" type="text/css" media="screen" /> -<link rel="stylesheet" href="../../../../../css/github.css" type="text/css" media="screen" /> -<script src="../../../../../js/jquery-1.3.2.min.js" type="text/javascript" charset="utf-8"></script> -<script src="../../../../../js/jquery-effect.js" type="text/javascript" charset="utf-8"></script> -<script src="../../../../../js/main.js" type="text/javascript" charset="utf-8"></script> -<script src="../../../../../js/highlight.pack.js" type="text/javascript" charset="utf-8"></script> - -</head> - -<body> - <div class="banner"> - - <h1> - <span class="type">Module</span> - JSON::Pure::Generator::GeneratorMethods::TrueClass - - </h1> - <ul class="files"> - - <li><a href="../../../../../files/lib/json/pure/generator_rb.html">lib/json/pure/generator.rb</a></li> - - </ul> - </div> - <div id="bodyContent"> - <div id="content"> - - - - - - - - - - - - - - - <!-- Method ref --> - <div class="sectiontitle">Methods</div> - <dl class="methods"> - - <dt>T</dt> - <dd> - <ul> - - - <li> - <a href="#method-i-to_json">to_json</a> - </li> - - </ul> - </dd> - - </dl> - - - - - - - - - - - - - - - - - - - <!-- Methods --> - - <div class="sectiontitle">Instance Public methods</div> - - <div class="method"> - <div class="title method-title" id="method-i-to_json"> - - <a name="method-i-to_json"></a><b>to_json</b>(*) - - </div> - - - <div class="description"> - <p>Returns a <a href="../../../../JSON.html">JSON</a> string for true: ‘true’.</p> - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-to_json_source')" id="l_method-i-to_json_source">show</a> - - </p> - <div id="method-i-to_json_source" class="dyn-source"> - <pre><span class="ruby-comment"># File lib/json/pure/generator.rb, line 457</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">to_json</span>(*) <span class="ruby-string">'true'</span> <span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - </div> - </div> - </body> -</html>
\ No newline at end of file diff --git a/doc/classes/JSON/Pure/Generator/State.html b/doc/classes/JSON/Pure/Generator/State.html deleted file mode 100644 index 0fc38b3..0000000 --- a/doc/classes/JSON/Pure/Generator/State.html +++ /dev/null @@ -1,752 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" - "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> -<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> -<head> - <title>JSON::Pure::Generator::State</title> - <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> - <link rel="stylesheet" href="../../../../css/reset.css" type="text/css" media="screen" /> -<link rel="stylesheet" href="../../../../css/main.css" type="text/css" media="screen" /> -<link rel="stylesheet" href="../../../../css/github.css" type="text/css" media="screen" /> -<script src="../../../../js/jquery-1.3.2.min.js" type="text/javascript" charset="utf-8"></script> -<script src="../../../../js/jquery-effect.js" type="text/javascript" charset="utf-8"></script> -<script src="../../../../js/main.js" type="text/javascript" charset="utf-8"></script> -<script src="../../../../js/highlight.pack.js" type="text/javascript" charset="utf-8"></script> - -</head> - -<body> - <div class="banner"> - - <h1> - <span class="type">Class</span> - JSON::Pure::Generator::State - - <span class="parent">< - - Object - - </span> - - </h1> - <ul class="files"> - - <li><a href="../../../../files/lib/json/pure/generator_rb.html">lib/json/pure/generator.rb</a></li> - - </ul> - </div> - <div id="bodyContent"> - <div id="content"> - - <div class="description"> - -<p>This class is used to create <a href="State.html">State</a> instances, that -are use to hold data while generating a <a -href="../../../JSON.html">JSON</a> text from a Ruby data structure.</p> - - </div> - - - - - - - - - - - - - - - <!-- Method ref --> - <div class="sectiontitle">Methods</div> - <dl class="methods"> - - <dt>#</dt> - <dd> - <ul> - - - <li> - <a href="#method-i-5B-5D">[]</a> - </li> - - </ul> - </dd> - - <dt>A</dt> - <dd> - <ul> - - - <li> - <a href="#method-i-allow_nan-3F">allow_nan?</a>, - </li> - - - <li> - <a href="#method-i-ascii_only-3F">ascii_only?</a> - </li> - - </ul> - </dd> - - <dt>C</dt> - <dd> - <ul> - - - <li> - <a href="#method-i-check_circular-3F">check_circular?</a>, - </li> - - - <li> - <a href="#method-i-configure">configure</a> - </li> - - </ul> - </dd> - - <dt>F</dt> - <dd> - <ul> - - - <li> - <a href="#method-c-from_state">from_state</a> - </li> - - </ul> - </dd> - - <dt>G</dt> - <dd> - <ul> - - - <li> - <a href="#method-i-generate">generate</a> - </li> - - </ul> - </dd> - - <dt>M</dt> - <dd> - <ul> - - - <li> - <a href="#method-i-merge">merge</a> - </li> - - </ul> - </dd> - - <dt>N</dt> - <dd> - <ul> - - - <li> - <a href="#method-c-new">new</a> - </li> - - </ul> - </dd> - - <dt>Q</dt> - <dd> - <ul> - - - <li> - <a href="#method-i-quirks_mode-3F">quirks_mode?</a> - </li> - - </ul> - </dd> - - <dt>T</dt> - <dd> - <ul> - - - <li> - <a href="#method-i-to_h">to_h</a> - </li> - - </ul> - </dd> - - </dl> - - - - - - - - - - - - - - - - - <!-- Section attributes --> - <div class="sectiontitle">Attributes</div> - <table border='0' cellpadding='5'> - - <tr valign='top'> - <td class='attr-rw'> - [RW] - </td> - <td class='attr-name'>array_nl</td> - <td class='attr-desc'><p>This string is put at the end of a line that holds a <a -href="../../../JSON.html">JSON</a> array.</p></td> - </tr> - - <tr valign='top'> - <td class='attr-rw'> - [RW] - </td> - <td class='attr-name'>depth</td> - <td class='attr-desc'><p>This integer returns the current depth data structure nesting in the -generated <a href="../../../JSON.html">JSON</a>.</p></td> - </tr> - - <tr valign='top'> - <td class='attr-rw'> - [RW] - </td> - <td class='attr-name'>indent</td> - <td class='attr-desc'><p>This string is used to indent levels in the <a -href="../../../JSON.html">JSON</a> text.</p></td> - </tr> - - <tr valign='top'> - <td class='attr-rw'> - [RW] - </td> - <td class='attr-name'>max_nesting</td> - <td class='attr-desc'><p>This integer returns the maximum level of data structure nesting in the -generated <a href="../../../JSON.html">JSON</a>, <a -href="State.html#attribute-i-max_nesting">#max_nesting</a> = 0 if no -maximum is checked.</p></td> - </tr> - - <tr valign='top'> - <td class='attr-rw'> - [RW] - </td> - <td class='attr-name'>object_nl</td> - <td class='attr-desc'><p>This string is put at the end of a line that holds a <a -href="../../../JSON.html">JSON</a> object (or Hash).</p></td> - </tr> - - <tr valign='top'> - <td class='attr-rw'> - [RW] - </td> - <td class='attr-name'>quirks_mode</td> - <td class='attr-desc'><p>If this attribute is set to true, quirks mode is enabled, otherwise it’s -disabled.</p></td> - </tr> - - <tr valign='top'> - <td class='attr-rw'> - [RW] - </td> - <td class='attr-name'>space</td> - <td class='attr-desc'><p>This string is used to insert a space between the tokens in a <a -href="../../../JSON.html">JSON</a> string.</p></td> - </tr> - - <tr valign='top'> - <td class='attr-rw'> - [RW] - </td> - <td class='attr-name'>space_before</td> - <td class='attr-desc'><p>This string is used to insert a space before the ‘:’ in <a -href="../../../JSON.html">JSON</a> objects.</p></td> - </tr> - - </table> - - - - <!-- Methods --> - - <div class="sectiontitle">Class Public methods</div> - - <div class="method"> - <div class="title method-title" id="method-c-from_state"> - - <a name="method-c-from_state"></a><b>from_state</b>(opts) - - </div> - - - <div class="description"> - <p>Creates a <a href="State.html">State</a> object from <em>opts</em>, which -ought to be Hash to create a new <a href="State.html">State</a> instance -configured by <em>opts</em>, something else to create an unconfigured -instance. If <em>opts</em> is a <a href="State.html">State</a> object, it -is just returned.</p> - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-c-from_state_source')" id="l_method-c-from_state_source">show</a> - - </p> - <div id="method-c-from_state_source" class="dyn-source"> - <pre><span class="ruby-comment"># File lib/json/pure/generator.rb, line 108</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">self</span>.<span class="ruby-identifier">from_state</span>(<span class="ruby-identifier">opts</span>) - <span class="ruby-keyword">case</span> - <span class="ruby-keyword">when</span> <span class="ruby-keyword">self</span> <span class="ruby-operator">===</span> <span class="ruby-identifier">opts</span> - <span class="ruby-identifier">opts</span> - <span class="ruby-keyword">when</span> <span class="ruby-identifier">opts</span>.<span class="ruby-identifier">respond_to?</span>(<span class="ruby-value">:to_hash</span>) - <span class="ruby-identifier">new</span>(<span class="ruby-identifier">opts</span>.<span class="ruby-identifier">to_hash</span>) - <span class="ruby-keyword">when</span> <span class="ruby-identifier">opts</span>.<span class="ruby-identifier">respond_to?</span>(<span class="ruby-value">:to_h</span>) - <span class="ruby-identifier">new</span>(<span class="ruby-identifier">opts</span>.<span class="ruby-identifier">to_h</span>) - <span class="ruby-keyword">else</span> - <span class="ruby-constant">SAFE_STATE_PROTOTYPE</span>.<span class="ruby-identifier">dup</span> - <span class="ruby-keyword">end</span> -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - - <div class="method"> - <div class="title method-title" id="method-c-new"> - - <a name="method-c-new"></a><b>new</b>(opts = {}) - - </div> - - - <div class="description"> - <p>Instantiates a new <a href="State.html">State</a> object, configured by -<em>opts</em>.</p> - -<p><em>opts</em> can have the following keys:</p> -<ul><li> -<p><strong>indent</strong>: a string used to indent levels (default: "),</p> -</li><li> -<p><strong>space</strong>: a string that is put after, a : or , delimiter -(default: "),</p> -</li><li> -<p><strong><a -href="State.html#attribute-i-space_before">#space_before</a></strong>: a -string that is put before a : pair delimiter (default: "),</p> -</li><li> -<p><strong><a href="State.html#attribute-i-object_nl">#object_nl</a></strong>: -a string that is put at the end of a <a href="../../../JSON.html">JSON</a> -object (default: "),</p> -</li><li> -<p><strong><a href="State.html#attribute-i-array_nl">#array_nl</a></strong>: a -string that is put at the end of a <a href="../../../JSON.html">JSON</a> -array (default: "),</p> -</li><li> -<p><strong>check_circular</strong>: is deprecated now, use the :<a -href="State.html#attribute-i-max_nesting">#max_nesting</a> option instead,</p> -</li><li> -<p><strong><a -href="State.html#attribute-i-max_nesting">#max_nesting</a></strong>: sets -the maximum level of data structure nesting in the generated <a -href="../../../JSON.html">JSON</a>, <a -href="State.html#attribute-i-max_nesting">#max_nesting</a> = 0 if no -maximum should be checked.</p> -</li><li> -<p><strong>allow_nan</strong>: true if NaN, Infinity, and -Infinity should be -generated, otherwise an exception is thrown, if these values are -encountered. This options defaults to false.</p> -</li><li> -<p><strong><a -href="State.html#attribute-i-quirks_mode">#quirks_mode</a></strong>: -Enables <a href="State.html#attribute-i-quirks_mode">#quirks_mode</a> for -parser, that is for example generating single <a -href="../../../JSON.html">JSON</a> values instead of documents is possible.</p> -</li></ul> - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-c-new_source')" id="l_method-c-new_source">show</a> - - </p> - <div id="method-c-new_source" class="dyn-source"> - <pre><span class="ruby-comment"># File lib/json/pure/generator.rb, line 138</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">initialize</span>(<span class="ruby-identifier">opts</span> = {}) - <span class="ruby-ivar">@indent</span> = <span class="ruby-string">''</span> - <span class="ruby-ivar">@space</span> = <span class="ruby-string">''</span> - <span class="ruby-ivar">@space_before</span> = <span class="ruby-string">''</span> - <span class="ruby-ivar">@object_nl</span> = <span class="ruby-string">''</span> - <span class="ruby-ivar">@array_nl</span> = <span class="ruby-string">''</span> - <span class="ruby-ivar">@allow_nan</span> = <span class="ruby-keyword">false</span> - <span class="ruby-ivar">@ascii_only</span> = <span class="ruby-keyword">false</span> - <span class="ruby-ivar">@quirks_mode</span> = <span class="ruby-keyword">false</span> - <span class="ruby-ivar">@buffer_initial_length</span> = <span class="ruby-number">1024</span> - <span class="ruby-identifier">configure</span> <span class="ruby-identifier">opts</span> -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - - <div class="sectiontitle">Instance Public methods</div> - - <div class="method"> - <div class="title method-title" id="method-i-5B-5D"> - - <a name="method-i-5B-5D"></a><b>[]</b>(name) - - </div> - - - <div class="description"> - <p>Return the value returned by method <code>name</code>.</p> - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-5B-5D_source')" id="l_method-i-5B-5D_source">show</a> - - </p> - <div id="method-i-5B-5D_source" class="dyn-source"> - <pre><span class="ruby-comment"># File lib/json/pure/generator.rb, line 269</span> -<span class="ruby-keyword">def</span> <span class="ruby-operator">[]</span>(<span class="ruby-keyword ruby-title">name</span>) - <span class="ruby-identifier">__send__</span> <span class="ruby-identifier">name</span> -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - - <div class="method"> - <div class="title method-title" id="method-i-allow_nan-3F"> - - <a name="method-i-allow_nan-3F"></a><b>allow_nan?</b>() - - </div> - - - <div class="description"> - <p>Returns true if NaN, Infinity, and -Infinity should be considered as valid -<a href="../../../JSON.html">JSON</a> and output.</p> - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-allow_nan-3F_source')" id="l_method-i-allow_nan-3F_source">show</a> - - </p> - <div id="method-i-allow_nan-3F_source" class="dyn-source"> - <pre><span class="ruby-comment"># File lib/json/pure/generator.rb, line 205</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">allow_nan?</span> - <span class="ruby-ivar">@allow_nan</span> -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - - <div class="method"> - <div class="title method-title" id="method-i-ascii_only-3F"> - - <a name="method-i-ascii_only-3F"></a><b>ascii_only?</b>() - - </div> - - - <div class="description"> - <p>Returns true, if only ASCII characters should be generated. Otherwise -returns false.</p> - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-ascii_only-3F_source')" id="l_method-i-ascii_only-3F_source">show</a> - - </p> - <div id="method-i-ascii_only-3F_source" class="dyn-source"> - <pre><span class="ruby-comment"># File lib/json/pure/generator.rb, line 211</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">ascii_only?</span> - <span class="ruby-ivar">@ascii_only</span> -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - - <div class="method"> - <div class="title method-title" id="method-i-check_circular-3F"> - - <a name="method-i-check_circular-3F"></a><b>check_circular?</b>() - - </div> - - - <div class="description"> - <p>Returns true, if circular data structures are checked, otherwise returns -false.</p> - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-check_circular-3F_source')" id="l_method-i-check_circular-3F_source">show</a> - - </p> - <div id="method-i-check_circular-3F_source" class="dyn-source"> - <pre><span class="ruby-comment"># File lib/json/pure/generator.rb, line 199</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">check_circular?</span> - <span class="ruby-operator">!</span><span class="ruby-ivar">@max_nesting</span>.<span class="ruby-identifier">zero?</span> -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - - <div class="method"> - <div class="title method-title" id="method-i-configure"> - - <a name="method-i-configure"></a><b>configure</b>(opts) - - </div> - - - <div class="description"> - <p>Configure this <a href="State.html">State</a> instance with the Hash -<em>opts</em>, and return itself.</p> - </div> - - - - <div class="aka"> - Also aliased as: <a href="State.html#method-i-merge">merge</a> - </div> - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-configure_source')" id="l_method-i-configure_source">show</a> - - </p> - <div id="method-i-configure_source" class="dyn-source"> - <pre><span class="ruby-comment"># File lib/json/pure/generator.rb, line 222</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">configure</span>(<span class="ruby-identifier">opts</span>) - <span class="ruby-ivar">@indent</span> = <span class="ruby-identifier">opts</span>[<span class="ruby-value">:indent</span>] <span class="ruby-keyword">if</span> <span class="ruby-identifier">opts</span>.<span class="ruby-identifier">key?</span>(<span class="ruby-value">:indent</span>) - <span class="ruby-ivar">@space</span> = <span class="ruby-identifier">opts</span>[<span class="ruby-value">:space</span>] <span class="ruby-keyword">if</span> <span class="ruby-identifier">opts</span>.<span class="ruby-identifier">key?</span>(<span class="ruby-value">:space</span>) - <span class="ruby-ivar">@space_before</span> = <span class="ruby-identifier">opts</span>[<span class="ruby-value">:space_before</span>] <span class="ruby-keyword">if</span> <span class="ruby-identifier">opts</span>.<span class="ruby-identifier">key?</span>(<span class="ruby-value">:space_before</span>) - <span class="ruby-ivar">@object_nl</span> = <span class="ruby-identifier">opts</span>[<span class="ruby-value">:object_nl</span>] <span class="ruby-keyword">if</span> <span class="ruby-identifier">opts</span>.<span class="ruby-identifier">key?</span>(<span class="ruby-value">:object_nl</span>) - <span class="ruby-ivar">@array_nl</span> = <span class="ruby-identifier">opts</span>[<span class="ruby-value">:array_nl</span>] <span class="ruby-keyword">if</span> <span class="ruby-identifier">opts</span>.<span class="ruby-identifier">key?</span>(<span class="ruby-value">:array_nl</span>) - <span class="ruby-ivar">@allow_nan</span> = <span class="ruby-operator">!</span><span class="ruby-operator">!</span><span class="ruby-identifier">opts</span>[<span class="ruby-value">:allow_nan</span>] <span class="ruby-keyword">if</span> <span class="ruby-identifier">opts</span>.<span class="ruby-identifier">key?</span>(<span class="ruby-value">:allow_nan</span>) - <span class="ruby-ivar">@ascii_only</span> = <span class="ruby-identifier">opts</span>[<span class="ruby-value">:ascii_only</span>] <span class="ruby-keyword">if</span> <span class="ruby-identifier">opts</span>.<span class="ruby-identifier">key?</span>(<span class="ruby-value">:ascii_only</span>) - <span class="ruby-ivar">@depth</span> = <span class="ruby-identifier">opts</span>[<span class="ruby-value">:depth</span>] <span class="ruby-operator">||</span> <span class="ruby-number">0</span> - <span class="ruby-ivar">@quirks_mode</span> = <span class="ruby-identifier">opts</span>[<span class="ruby-value">:quirks_mode</span>] <span class="ruby-keyword">if</span> <span class="ruby-identifier">opts</span>.<span class="ruby-identifier">key?</span>(<span class="ruby-value">:quirks_mode</span>) - <span class="ruby-keyword">if</span> <span class="ruby-operator">!</span><span class="ruby-identifier">opts</span>.<span class="ruby-identifier">key?</span>(<span class="ruby-value">:max_nesting</span>) <span class="ruby-comment"># defaults to 19</span> - <span class="ruby-ivar">@max_nesting</span> = <span class="ruby-number">19</span> - <span class="ruby-keyword">elsif</span> <span class="ruby-identifier">opts</span>[<span class="ruby-value">:max_nesting</span>] - <span class="ruby-ivar">@max_nesting</span> = <span class="ruby-identifier">opts</span>[<span class="ruby-value">:max_nesting</span>] - <span class="ruby-keyword">else</span> - <span class="ruby-ivar">@max_nesting</span> = <span class="ruby-number">0</span> - <span class="ruby-keyword">end</span> - <span class="ruby-keyword">self</span> -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - - <div class="method"> - <div class="title method-title" id="method-i-generate"> - - <a name="method-i-generate"></a><b>generate</b>(obj) - - </div> - - - <div class="description"> - <p>Generates a valid <a href="../../../JSON.html">JSON</a> document from -object <code>obj</code> and returns the result. If no valid <a -href="../../../JSON.html">JSON</a> document can be created this method -raises a <a href="../../GeneratorError.html">GeneratorError</a> exception.</p> - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-generate_source')" id="l_method-i-generate_source">show</a> - - </p> - <div id="method-i-generate_source" class="dyn-source"> - <pre><span class="ruby-comment"># File lib/json/pure/generator.rb, line 256</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">generate</span>(<span class="ruby-identifier">obj</span>) - <span class="ruby-identifier">result</span> = <span class="ruby-identifier">obj</span>.<span class="ruby-identifier">to_json</span>(<span class="ruby-keyword">self</span>) - <span class="ruby-keyword">unless</span> <span class="ruby-ivar">@quirks_mode</span> - <span class="ruby-keyword">unless</span> <span class="ruby-identifier">result</span> <span class="ruby-operator">=~</span> <span class="ruby-regexp">%r\A\s*\[/</span> <span class="ruby-operator">&&</span> <span class="ruby-identifier">result</span> <span class="ruby-operator">=~</span> <span class="ruby-regexp">%r\]\s*\Z/</span> <span class="ruby-operator">||</span> - <span class="ruby-identifier">result</span> <span class="ruby-operator">=~</span> <span class="ruby-regexp">%r\A\s*\{/</span> <span class="ruby-operator">&&</span> <span class="ruby-identifier">result</span> <span class="ruby-operator">=~</span> <span class="ruby-regexp">%r\}\s*\Z/</span> - <span class="ruby-keyword">then</span> - <span class="ruby-identifier">raise</span> <span class="ruby-constant">GeneratorError</span>, <span class="ruby-string">"only generation of JSON objects or arrays allowed"</span> - <span class="ruby-keyword">end</span> - <span class="ruby-keyword">end</span> - <span class="ruby-identifier">result</span> -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - - <div class="method"> - <div class="title method-title" id="method-i-merge"> - - <a name="method-i-merge"></a><b>merge</b>(opts) - - </div> - - - <div class="description"> - - </div> - - - - - - </div> - - <div class="method"> - <div class="title method-title" id="method-i-quirks_mode-3F"> - - <a name="method-i-quirks_mode-3F"></a><b>quirks_mode?</b>() - - </div> - - - <div class="description"> - <p>Returns true, if quirks mode is enabled. Otherwise returns false.</p> - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-quirks_mode-3F_source')" id="l_method-i-quirks_mode-3F_source">show</a> - - </p> - <div id="method-i-quirks_mode-3F_source" class="dyn-source"> - <pre><span class="ruby-comment"># File lib/json/pure/generator.rb, line 216</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">quirks_mode?</span> - <span class="ruby-ivar">@quirks_mode</span> -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - - <div class="method"> - <div class="title method-title" id="method-i-to_h"> - - <a name="method-i-to_h"></a><b>to_h</b>() - - </div> - - - <div class="description"> - <p>Returns the configuration instance variables as a hash, that can be passed -to the configure method.</p> - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-to_h_source')" id="l_method-i-to_h_source">show</a> - - </p> - <div id="method-i-to_h_source" class="dyn-source"> - <pre><span class="ruby-comment"># File lib/json/pure/generator.rb, line 245</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">to_h</span> - <span class="ruby-identifier">result</span> = {} - <span class="ruby-keyword">for</span> <span class="ruby-identifier">iv</span> <span class="ruby-keyword">in</span> <span class="ruby-node">%w[indent space space_before object_nl array_nl allow_nan max_nesting ascii_only quirks_mode buffer_initial_length depth]</span> - <span class="ruby-identifier">result</span>[<span class="ruby-identifier">iv</span>.<span class="ruby-identifier">intern</span>] = <span class="ruby-identifier">instance_variable_get</span>(<span class="ruby-node">"@#{iv}"</span>) - <span class="ruby-keyword">end</span> - <span class="ruby-identifier">result</span> -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - </div> - </div> - </body> -</html>
\ No newline at end of file diff --git a/doc/classes/JSON/Pure/Parser.html b/doc/classes/JSON/Pure/Parser.html deleted file mode 100644 index 93c5ea4..0000000 --- a/doc/classes/JSON/Pure/Parser.html +++ /dev/null @@ -1,620 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" - "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> -<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> -<head> - <title>JSON::Pure::Parser</title> - <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> - <link rel="stylesheet" href="../../../css/reset.css" type="text/css" media="screen" /> -<link rel="stylesheet" href="../../../css/main.css" type="text/css" media="screen" /> -<link rel="stylesheet" href="../../../css/github.css" type="text/css" media="screen" /> -<script src="../../../js/jquery-1.3.2.min.js" type="text/javascript" charset="utf-8"></script> -<script src="../../../js/jquery-effect.js" type="text/javascript" charset="utf-8"></script> -<script src="../../../js/main.js" type="text/javascript" charset="utf-8"></script> -<script src="../../../js/highlight.pack.js" type="text/javascript" charset="utf-8"></script> - -</head> - -<body> - <div class="banner"> - - <h1> - <span class="type">Class</span> - JSON::Pure::Parser - - <span class="parent">< - - StringScanner - - </span> - - </h1> - <ul class="files"> - - <li><a href="../../../files/lib/json/pure/parser_rb.html">lib/json/pure/parser.rb</a></li> - - </ul> - </div> - <div id="bodyContent"> - <div id="content"> - - <div class="description"> - -<p>This class implements the <a href="../../JSON.html">JSON</a> parser that is -used to parse a <a href="../../JSON.html">JSON</a> string into a Ruby data -structure.</p> - - </div> - - - - - - - - - - - - - - - <!-- Method ref --> - <div class="sectiontitle">Methods</div> - <dl class="methods"> - - <dt>N</dt> - <dd> - <ul> - - - <li> - <a href="#method-c-new">new</a> - </li> - - </ul> - </dd> - - <dt>P</dt> - <dd> - <ul> - - - <li> - <a href="#method-i-parse">parse</a> - </li> - - </ul> - </dd> - - <dt>Q</dt> - <dd> - <ul> - - - <li> - <a href="#method-i-quirks_mode-3F">quirks_mode?</a> - </li> - - </ul> - </dd> - - <dt>R</dt> - <dd> - <ul> - - - <li> - <a href="#method-i-reset">reset</a> - </li> - - </ul> - </dd> - - </dl> - - - - - - - - - - - - - - <!-- Section constants --> - <div class="sectiontitle">Constants</div> - <table border='0' cellpadding='5'> - - <tr valign='top'> - <td class="attr-name">STRING</td> - <td>=</td> - <td class="attr-value">/" ((?:[^\x0-\x1f"\\] | -# escaped special characters: -\\["\\\/bfnrt] | -\\u[0-9a-fA-F]{4} | -# match all but escaped special characters: -\\[\x20-\x21\x23-\x2e\x30-\x5b\x5d-\x61\x63-\x65\x67-\x6d\x6f-\x71\x73\x75-\xff])*) -"/nx</td> - </tr> - - <tr valign='top'> - <td> </td> - <td colspan="2" class="attr-desc"></td> - </tr> - - - <tr valign='top'> - <td class="attr-name">INTEGER</td> - <td>=</td> - <td class="attr-value">/(-?0|-?[1-9]\d*)/</td> - </tr> - - <tr valign='top'> - <td> </td> - <td colspan="2" class="attr-desc"></td> - </tr> - - - <tr valign='top'> - <td class="attr-name">FLOAT</td> - <td>=</td> - <td class="attr-value">/(-? -(?:0|[1-9]\d*) -(?: -\.\d+(?i:e[+-]?\d+) | -\.\d+ | -(?i:e[+-]?\d+) -) -)/x</td> - </tr> - - <tr valign='top'> - <td> </td> - <td colspan="2" class="attr-desc"></td> - </tr> - - - <tr valign='top'> - <td class="attr-name">NAN</td> - <td>=</td> - <td class="attr-value">/NaN/</td> - </tr> - - <tr valign='top'> - <td> </td> - <td colspan="2" class="attr-desc"></td> - </tr> - - - <tr valign='top'> - <td class="attr-name">INFINITY</td> - <td>=</td> - <td class="attr-value">/Infinity/</td> - </tr> - - <tr valign='top'> - <td> </td> - <td colspan="2" class="attr-desc"></td> - </tr> - - - <tr valign='top'> - <td class="attr-name">MINUS_INFINITY</td> - <td>=</td> - <td class="attr-value">/-Infinity/</td> - </tr> - - <tr valign='top'> - <td> </td> - <td colspan="2" class="attr-desc"></td> - </tr> - - - <tr valign='top'> - <td class="attr-name">OBJECT_OPEN</td> - <td>=</td> - <td class="attr-value">/\{/</td> - </tr> - - <tr valign='top'> - <td> </td> - <td colspan="2" class="attr-desc"></td> - </tr> - - - <tr valign='top'> - <td class="attr-name">OBJECT_CLOSE</td> - <td>=</td> - <td class="attr-value">/\}/</td> - </tr> - - <tr valign='top'> - <td> </td> - <td colspan="2" class="attr-desc"></td> - </tr> - - - <tr valign='top'> - <td class="attr-name">ARRAY_OPEN</td> - <td>=</td> - <td class="attr-value">/\[/</td> - </tr> - - <tr valign='top'> - <td> </td> - <td colspan="2" class="attr-desc"></td> - </tr> - - - <tr valign='top'> - <td class="attr-name">ARRAY_CLOSE</td> - <td>=</td> - <td class="attr-value">/\]/</td> - </tr> - - <tr valign='top'> - <td> </td> - <td colspan="2" class="attr-desc"></td> - </tr> - - - <tr valign='top'> - <td class="attr-name">PAIR_DELIMITER</td> - <td>=</td> - <td class="attr-value">/:/</td> - </tr> - - <tr valign='top'> - <td> </td> - <td colspan="2" class="attr-desc"></td> - </tr> - - - <tr valign='top'> - <td class="attr-name">COLLECTION_DELIMITER</td> - <td>=</td> - <td class="attr-value">/,/</td> - </tr> - - <tr valign='top'> - <td> </td> - <td colspan="2" class="attr-desc"></td> - </tr> - - - <tr valign='top'> - <td class="attr-name">TRUE</td> - <td>=</td> - <td class="attr-value">/true/</td> - </tr> - - <tr valign='top'> - <td> </td> - <td colspan="2" class="attr-desc"></td> - </tr> - - - <tr valign='top'> - <td class="attr-name">FALSE</td> - <td>=</td> - <td class="attr-value">/false/</td> - </tr> - - <tr valign='top'> - <td> </td> - <td colspan="2" class="attr-desc"></td> - </tr> - - - <tr valign='top'> - <td class="attr-name">NULL</td> - <td>=</td> - <td class="attr-value">/null/</td> - </tr> - - <tr valign='top'> - <td> </td> - <td colspan="2" class="attr-desc"></td> - </tr> - - - <tr valign='top'> - <td class="attr-name">IGNORE</td> - <td>=</td> - <td class="attr-value">%r( -(?: -//[^\n\r]*[\n\r]| # line comments -/\* # c-style comments -(?: -[^*/]| # normal chars -/[^*]| # slashes that do not start a nested comment -\*[^/]| # asterisks that do not end this comment -/(?=\*/) # single slash before this comment's end -)* -\*/ # the End of this comment -|[ \t\r\n]+ # whitespaces: space, horicontal tab, lf, cr -)+ -)mx</td> - </tr> - - <tr valign='top'> - <td> </td> - <td colspan="2" class="attr-desc"></td> - </tr> - - - <tr valign='top'> - <td class="attr-name">UNPARSED</td> - <td>=</td> - <td class="attr-value">Object.new</td> - </tr> - - <tr valign='top'> - <td> </td> - <td colspan="2" class="attr-desc"></td> - </tr> - - - <tr valign='top'> - <td class="attr-name">UNESCAPE_MAP</td> - <td>=</td> - <td class="attr-value">Hash.new { |h, k| h[k] = k.chr }</td> - </tr> - - <tr valign='top'> - <td> </td> - <td colspan="2" class="attr-desc"><p>Unescape characters in strings.</p></td> - </tr> - - - <tr valign='top'> - <td class="attr-name">EMPTY_8BIT_STRING</td> - <td>=</td> - <td class="attr-value">''</td> - </tr> - - <tr valign='top'> - <td> </td> - <td colspan="2" class="attr-desc"></td> - </tr> - - - </table> - - - - - - - <!-- Methods --> - - <div class="sectiontitle">Class Public methods</div> - - <div class="method"> - <div class="title method-title" id="method-c-new"> - - <a name="method-c-new"></a><b>new</b>(source, opts = {}) - - </div> - - - <div class="description"> - <p>Creates a new <a href="Parser.html">JSON::Pure::Parser</a> instance for the -string <em>source</em>.</p> - -<p>It will be configured by the <em>opts</em> hash. <em>opts</em> can have the -following keys:</p> -<ul><li> -<p><strong>max_nesting</strong>: The maximum depth of nesting allowed in the -parsed data structures. Disable depth checking with :max_nesting => -false|nil|0, it defaults to 19.</p> -</li><li> -<p><strong>allow_nan</strong>: If set to true, allow NaN, Infinity and --Infinity in defiance of RFC 4627 to be parsed by the <a -href="Parser.html">Parser</a>. This option defaults to false.</p> -</li><li> -<p><strong>symbolize_names</strong>: If set to true, returns symbols for the -names (keys) in a <a href="../../JSON.html">JSON</a> object. Otherwise -strings are returned, which is also the default.</p> -</li><li> -<p><strong>create_additions</strong>: If set to false, the <a -href="Parser.html">Parser</a> doesn't create additions even if a matchin -class and create_id was found. This option defaults to true.</p> -</li><li> -<p><strong>object_class</strong>: Defaults to Hash</p> -</li><li> -<p><strong>array_class</strong>: Defaults to Array</p> -</li><li> -<p><strong>quirks_mode</strong>: Enables quirks_mode for parser, that is for -example parsing single <a href="../../JSON.html">JSON</a> values instead of -documents is possible.</p> -</li></ul> - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-c-new_source')" id="l_method-c-new_source">show</a> - - </p> - <div id="method-c-new_source" class="dyn-source"> - <pre><span class="ruby-comment"># File lib/json/pure/parser.rb, line 73</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">initialize</span>(<span class="ruby-identifier">source</span>, <span class="ruby-identifier">opts</span> = {}) - <span class="ruby-identifier">opts</span> <span class="ruby-operator">||=</span> {} - <span class="ruby-keyword">unless</span> <span class="ruby-ivar">@quirks_mode</span> = <span class="ruby-identifier">opts</span>[<span class="ruby-value">:quirks_mode</span>] - <span class="ruby-identifier">source</span> = <span class="ruby-identifier">convert_encoding</span> <span class="ruby-identifier">source</span> - <span class="ruby-keyword">end</span> - <span class="ruby-keyword">super</span> <span class="ruby-identifier">source</span> - <span class="ruby-keyword">if</span> <span class="ruby-operator">!</span><span class="ruby-identifier">opts</span>.<span class="ruby-identifier">key?</span>(<span class="ruby-value">:max_nesting</span>) <span class="ruby-comment"># defaults to 19</span> - <span class="ruby-ivar">@max_nesting</span> = <span class="ruby-number">19</span> - <span class="ruby-keyword">elsif</span> <span class="ruby-identifier">opts</span>[<span class="ruby-value">:max_nesting</span>] - <span class="ruby-ivar">@max_nesting</span> = <span class="ruby-identifier">opts</span>[<span class="ruby-value">:max_nesting</span>] - <span class="ruby-keyword">else</span> - <span class="ruby-ivar">@max_nesting</span> = <span class="ruby-number">0</span> - <span class="ruby-keyword">end</span> - <span class="ruby-ivar">@allow_nan</span> = <span class="ruby-operator">!</span><span class="ruby-operator">!</span><span class="ruby-identifier">opts</span>[<span class="ruby-value">:allow_nan</span>] - <span class="ruby-ivar">@symbolize_names</span> = <span class="ruby-operator">!</span><span class="ruby-operator">!</span><span class="ruby-identifier">opts</span>[<span class="ruby-value">:symbolize_names</span>] - <span class="ruby-keyword">if</span> <span class="ruby-identifier">opts</span>.<span class="ruby-identifier">key?</span>(<span class="ruby-value">:create_additions</span>) - <span class="ruby-ivar">@create_additions</span> = <span class="ruby-operator">!</span><span class="ruby-operator">!</span><span class="ruby-identifier">opts</span>[<span class="ruby-value">:create_additions</span>] - <span class="ruby-keyword">else</span> - <span class="ruby-ivar">@create_additions</span> = <span class="ruby-keyword">true</span> - <span class="ruby-keyword">end</span> - <span class="ruby-ivar">@create_id</span> = <span class="ruby-ivar">@create_additions</span> <span class="ruby-operator">?</span> <span class="ruby-constant">JSON</span>.<span class="ruby-identifier">create_id</span> <span class="ruby-operator">:</span> <span class="ruby-keyword">nil</span> - <span class="ruby-ivar">@object_class</span> = <span class="ruby-identifier">opts</span>[<span class="ruby-value">:object_class</span>] <span class="ruby-operator">||</span> <span class="ruby-constant">Hash</span> - <span class="ruby-ivar">@array_class</span> = <span class="ruby-identifier">opts</span>[<span class="ruby-value">:array_class</span>] <span class="ruby-operator">||</span> <span class="ruby-constant">Array</span> - <span class="ruby-ivar">@match_string</span> = <span class="ruby-identifier">opts</span>[<span class="ruby-value">:match_string</span>] -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - - <div class="sectiontitle">Instance Public methods</div> - - <div class="method"> - <div class="title method-title" id="method-i-parse"> - - <a name="method-i-parse"></a><b>parse</b>() - - </div> - - - <div class="description"> - <p>Parses the current <a href="../../JSON.html">JSON</a> string -<em>source</em> and returns the complete data structure as a result.</p> - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-parse_source')" id="l_method-i-parse_source">show</a> - - </p> - <div id="method-i-parse_source" class="dyn-source"> - <pre><span class="ruby-comment"># File lib/json/pure/parser.rb, line 112</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">parse</span> - <span class="ruby-identifier">reset</span> - <span class="ruby-identifier">obj</span> = <span class="ruby-keyword">nil</span> - <span class="ruby-keyword">if</span> <span class="ruby-ivar">@quirks_mode</span> - <span class="ruby-keyword">while</span> <span class="ruby-operator">!</span><span class="ruby-identifier">eos?</span> <span class="ruby-operator">&&</span> <span class="ruby-identifier">skip</span>(<span class="ruby-constant">IGNORE</span>) - <span class="ruby-keyword">end</span> - <span class="ruby-keyword">if</span> <span class="ruby-identifier">eos?</span> - <span class="ruby-identifier">raise</span> <span class="ruby-constant">ParserError</span>, <span class="ruby-string">"source did not contain any JSON!"</span> - <span class="ruby-keyword">else</span> - <span class="ruby-identifier">obj</span> = <span class="ruby-identifier">parse_value</span> - <span class="ruby-identifier">obj</span> <span class="ruby-operator">==</span> <span class="ruby-constant">UNPARSED</span> <span class="ruby-keyword">and</span> <span class="ruby-identifier">raise</span> <span class="ruby-constant">ParserError</span>, <span class="ruby-string">"source did not contain any JSON!"</span> - <span class="ruby-keyword">end</span> - <span class="ruby-keyword">else</span> - <span class="ruby-keyword">until</span> <span class="ruby-identifier">eos?</span> - <span class="ruby-keyword">case</span> - <span class="ruby-keyword">when</span> <span class="ruby-identifier">scan</span>(<span class="ruby-constant">OBJECT_OPEN</span>) - <span class="ruby-identifier">obj</span> <span class="ruby-keyword">and</span> <span class="ruby-identifier">raise</span> <span class="ruby-constant">ParserError</span>, <span class="ruby-node">"source '#{peek(20)}' not in JSON!"</span> - <span class="ruby-ivar">@current_nesting</span> = <span class="ruby-number">1</span> - <span class="ruby-identifier">obj</span> = <span class="ruby-identifier">parse_object</span> - <span class="ruby-keyword">when</span> <span class="ruby-identifier">scan</span>(<span class="ruby-constant">ARRAY_OPEN</span>) - <span class="ruby-identifier">obj</span> <span class="ruby-keyword">and</span> <span class="ruby-identifier">raise</span> <span class="ruby-constant">ParserError</span>, <span class="ruby-node">"source '#{peek(20)}' not in JSON!"</span> - <span class="ruby-ivar">@current_nesting</span> = <span class="ruby-number">1</span> - <span class="ruby-identifier">obj</span> = <span class="ruby-identifier">parse_array</span> - <span class="ruby-keyword">when</span> <span class="ruby-identifier">skip</span>(<span class="ruby-constant">IGNORE</span>) - ; - <span class="ruby-keyword">else</span> - <span class="ruby-identifier">raise</span> <span class="ruby-constant">ParserError</span>, <span class="ruby-node">"source '#{peek(20)}' not in JSON!"</span> - <span class="ruby-keyword">end</span> - <span class="ruby-keyword">end</span> - <span class="ruby-identifier">obj</span> <span class="ruby-keyword">or</span> <span class="ruby-identifier">raise</span> <span class="ruby-constant">ParserError</span>, <span class="ruby-string">"source did not contain any JSON!"</span> - <span class="ruby-keyword">end</span> - <span class="ruby-identifier">obj</span> -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - - <div class="method"> - <div class="title method-title" id="method-i-quirks_mode-3F"> - - <a name="method-i-quirks_mode-3F"></a><b>quirks_mode?</b>() - - </div> - - - <div class="description"> - - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-quirks_mode-3F_source')" id="l_method-i-quirks_mode-3F_source">show</a> - - </p> - <div id="method-i-quirks_mode-3F_source" class="dyn-source"> - <pre><span class="ruby-comment"># File lib/json/pure/parser.rb, line 101</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">quirks_mode?</span> - <span class="ruby-operator">!</span><span class="ruby-operator">!</span><span class="ruby-ivar">@quirks_mode</span> -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - - <div class="method"> - <div class="title method-title" id="method-i-reset"> - - <a name="method-i-reset"></a><b>reset</b>() - - </div> - - - <div class="description"> - - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-reset_source')" id="l_method-i-reset_source">show</a> - - </p> - <div id="method-i-reset_source" class="dyn-source"> - <pre><span class="ruby-comment"># File lib/json/pure/parser.rb, line 105</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">reset</span> - <span class="ruby-keyword">super</span> - <span class="ruby-ivar">@current_nesting</span> = <span class="ruby-number">0</span> -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - </div> - </div> - </body> -</html>
\ No newline at end of file diff --git a/doc/classes/Kernel.html b/doc/classes/Kernel.html deleted file mode 100644 index 53482e9..0000000 --- a/doc/classes/Kernel.html +++ /dev/null @@ -1,69 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" - "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> -<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> -<head> - <title>Kernel</title> - <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> - <link rel="stylesheet" href="../css/reset.css" type="text/css" media="screen" /> -<link rel="stylesheet" href="../css/main.css" type="text/css" media="screen" /> -<link rel="stylesheet" href="../css/github.css" type="text/css" media="screen" /> -<script src="../js/jquery-1.3.2.min.js" type="text/javascript" charset="utf-8"></script> -<script src="../js/jquery-effect.js" type="text/javascript" charset="utf-8"></script> -<script src="../js/main.js" type="text/javascript" charset="utf-8"></script> -<script src="../js/highlight.pack.js" type="text/javascript" charset="utf-8"></script> - -</head> - -<body> - <div class="banner"> - - <h1> - <span class="type">Module</span> - Kernel - - </h1> - <ul class="files"> - - <li><a href="../files/lib/json/common_rb.html">lib/json/common.rb</a></li> - - </ul> - </div> - <div id="bodyContent"> - <div id="content"> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - <!-- Methods --> - </div> - </div> - </body> -</html>
\ No newline at end of file diff --git a/doc/classes/OpenStruct.html b/doc/classes/OpenStruct.html deleted file mode 100644 index eaf757a..0000000 --- a/doc/classes/OpenStruct.html +++ /dev/null @@ -1,238 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" - "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> -<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> -<head> - <title>OpenStruct</title> - <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> - <link rel="stylesheet" href="../css/reset.css" type="text/css" media="screen" /> -<link rel="stylesheet" href="../css/main.css" type="text/css" media="screen" /> -<link rel="stylesheet" href="../css/github.css" type="text/css" media="screen" /> -<script src="../js/jquery-1.3.2.min.js" type="text/javascript" charset="utf-8"></script> -<script src="../js/jquery-effect.js" type="text/javascript" charset="utf-8"></script> -<script src="../js/main.js" type="text/javascript" charset="utf-8"></script> -<script src="../js/highlight.pack.js" type="text/javascript" charset="utf-8"></script> - -</head> - -<body> - <div class="banner"> - - <h1> - <span class="type">Class</span> - OpenStruct - - <span class="parent">< - - Object - - </span> - - </h1> - <ul class="files"> - - <li><a href="../files/lib/json/add/ostruct_rb.html">lib/json/add/ostruct.rb</a></li> - - </ul> - </div> - <div id="bodyContent"> - <div id="content"> - - <div class="description"> - -<p><a href="OpenStruct.html">OpenStruct</a> serialization/deserialization</p> - - </div> - - - - - - - - - - - - - - - <!-- Method ref --> - <div class="sectiontitle">Methods</div> - <dl class="methods"> - - <dt>A</dt> - <dd> - <ul> - - - <li> - <a href="#method-i-as_json">as_json</a> - </li> - - </ul> - </dd> - - <dt>J</dt> - <dd> - <ul> - - - <li> - <a href="#method-c-json_create">json_create</a> - </li> - - </ul> - </dd> - - <dt>T</dt> - <dd> - <ul> - - - <li> - <a href="#method-i-to_json">to_json</a> - </li> - - </ul> - </dd> - - </dl> - - - - - - - - - - - - - - - - - - - <!-- Methods --> - - <div class="sectiontitle">Class Public methods</div> - - <div class="method"> - <div class="title method-title" id="method-c-json_create"> - - <a name="method-c-json_create"></a><b>json_create</b>(object) - - </div> - - - <div class="description"> - <p>Deserializes <a href="JSON.html">JSON</a> string by constructing new <a -href="Struct.html">Struct</a> object with values <code>v</code> serialized -by <code>to_json</code>.</p> - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-c-json_create_source')" id="l_method-c-json_create_source">show</a> - - </p> - <div id="method-c-json_create_source" class="dyn-source"> - <pre><span class="ruby-comment"># File lib/json/add/ostruct.rb, line 11</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">self</span>.<span class="ruby-identifier">json_create</span>(<span class="ruby-identifier">object</span>) - <span class="ruby-identifier">new</span>(<span class="ruby-identifier">object</span>[<span class="ruby-string">'t'</span>] <span class="ruby-operator">||</span> <span class="ruby-identifier">object</span>[<span class="ruby-value">:t</span>]) -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - - <div class="sectiontitle">Instance Public methods</div> - - <div class="method"> - <div class="title method-title" id="method-i-as_json"> - - <a name="method-i-as_json"></a><b>as_json</b>(*) - - </div> - - - <div class="description"> - <p>Returns a hash, that will be turned into a <a href="JSON.html">JSON</a> -object and represent this object.</p> - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-as_json_source')" id="l_method-i-as_json_source">show</a> - - </p> - <div id="method-i-as_json_source" class="dyn-source"> - <pre><span class="ruby-comment"># File lib/json/add/ostruct.rb, line 17</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">as_json</span>(*) - <span class="ruby-identifier">klass</span> = <span class="ruby-keyword">self</span>.<span class="ruby-identifier">class</span>.<span class="ruby-identifier">name</span> - <span class="ruby-identifier">klass</span>.<span class="ruby-identifier">to_s</span>.<span class="ruby-identifier">empty?</span> <span class="ruby-keyword">and</span> <span class="ruby-identifier">raise</span> <span class="ruby-constant">JSON</span><span class="ruby-operator">::</span><span class="ruby-constant">JSONError</span>, <span class="ruby-string">"Only named structs are supported!"</span> - { - <span class="ruby-constant">JSON</span>.<span class="ruby-identifier">create_id</span> =<span class="ruby-operator">></span> <span class="ruby-identifier">klass</span>, - <span class="ruby-string">'t'</span> =<span class="ruby-operator">></span> <span class="ruby-identifier">table</span>, - } -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - - <div class="method"> - <div class="title method-title" id="method-i-to_json"> - - <a name="method-i-to_json"></a><b>to_json</b>(*args) - - </div> - - - <div class="description"> - <p>Stores class name (<a href="OpenStruct.html">OpenStruct</a>) with this -struct’s values <code>v</code> as a <a href="JSON.html">JSON</a> string.</p> - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-to_json_source')" id="l_method-i-to_json_source">show</a> - - </p> - <div id="method-i-to_json_source" class="dyn-source"> - <pre><span class="ruby-comment"># File lib/json/add/ostruct.rb, line 28</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">to_json</span>(*<span class="ruby-identifier">args</span>) - <span class="ruby-identifier">as_json</span>.<span class="ruby-identifier">to_json</span>(*<span class="ruby-identifier">args</span>) -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - </div> - </div> - </body> -</html>
\ No newline at end of file diff --git a/doc/classes/Range.html b/doc/classes/Range.html deleted file mode 100644 index 59a84b8..0000000 --- a/doc/classes/Range.html +++ /dev/null @@ -1,238 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" - "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> -<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> -<head> - <title>Range</title> - <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> - <link rel="stylesheet" href="../css/reset.css" type="text/css" media="screen" /> -<link rel="stylesheet" href="../css/main.css" type="text/css" media="screen" /> -<link rel="stylesheet" href="../css/github.css" type="text/css" media="screen" /> -<script src="../js/jquery-1.3.2.min.js" type="text/javascript" charset="utf-8"></script> -<script src="../js/jquery-effect.js" type="text/javascript" charset="utf-8"></script> -<script src="../js/main.js" type="text/javascript" charset="utf-8"></script> -<script src="../js/highlight.pack.js" type="text/javascript" charset="utf-8"></script> - -</head> - -<body> - <div class="banner"> - - <h1> - <span class="type">Class</span> - Range - - <span class="parent">< - - Object - - </span> - - </h1> - <ul class="files"> - - <li><a href="../files/lib/json/add/range_rb.html">lib/json/add/range.rb</a></li> - - </ul> - </div> - <div id="bodyContent"> - <div id="content"> - - <div class="description"> - -<p><a href="Range.html">Range</a> serialization/deserialization</p> - - </div> - - - - - - - - - - - - - - - <!-- Method ref --> - <div class="sectiontitle">Methods</div> - <dl class="methods"> - - <dt>A</dt> - <dd> - <ul> - - - <li> - <a href="#method-i-as_json">as_json</a> - </li> - - </ul> - </dd> - - <dt>J</dt> - <dd> - <ul> - - - <li> - <a href="#method-c-json_create">json_create</a> - </li> - - </ul> - </dd> - - <dt>T</dt> - <dd> - <ul> - - - <li> - <a href="#method-i-to_json">to_json</a> - </li> - - </ul> - </dd> - - </dl> - - - - - - - - - - - - - - - - - - - <!-- Methods --> - - <div class="sectiontitle">Class Public methods</div> - - <div class="method"> - <div class="title method-title" id="method-c-json_create"> - - <a name="method-c-json_create"></a><b>json_create</b>(object) - - </div> - - - <div class="description"> - <p>Deserializes <a href="JSON.html">JSON</a> string by constructing new <a -href="Range.html">Range</a> object with arguments <code>a</code> serialized -by <code>to_json</code>.</p> - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-c-json_create_source')" id="l_method-c-json_create_source">show</a> - - </p> - <div id="method-c-json_create_source" class="dyn-source"> - <pre><span class="ruby-comment"># File lib/json/add/range.rb, line 10</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">self</span>.<span class="ruby-identifier">json_create</span>(<span class="ruby-identifier">object</span>) - <span class="ruby-identifier">new</span>(*<span class="ruby-identifier">object</span>[<span class="ruby-string">'a'</span>]) -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - - <div class="sectiontitle">Instance Public methods</div> - - <div class="method"> - <div class="title method-title" id="method-i-as_json"> - - <a name="method-i-as_json"></a><b>as_json</b>(*) - - </div> - - - <div class="description"> - <p>Returns a hash, that will be turned into a <a href="JSON.html">JSON</a> -object and represent this object.</p> - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-as_json_source')" id="l_method-i-as_json_source">show</a> - - </p> - <div id="method-i-as_json_source" class="dyn-source"> - <pre><span class="ruby-comment"># File lib/json/add/range.rb, line 16</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">as_json</span>(*) - { - <span class="ruby-constant">JSON</span>.<span class="ruby-identifier">create_id</span> =<span class="ruby-operator">></span> <span class="ruby-keyword">self</span>.<span class="ruby-identifier">class</span>.<span class="ruby-identifier">name</span>, - <span class="ruby-string">'a'</span> =<span class="ruby-operator">></span> [ <span class="ruby-identifier">first</span>, <span class="ruby-identifier">last</span>, <span class="ruby-identifier">exclude_end?</span> ] - } -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - - <div class="method"> - <div class="title method-title" id="method-i-to_json"> - - <a name="method-i-to_json"></a><b>to_json</b>(*args) - - </div> - - - <div class="description"> - <p>Stores class name (<a href="Range.html">Range</a>) with <a -href="JSON.html">JSON</a> array of arguments <code>a</code> which include -<code>first</code> (integer), <code>last</code> (integer), and -<code>exclude_end?</code> (boolean) as <a href="JSON.html">JSON</a> string.</p> - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-to_json_source')" id="l_method-i-to_json_source">show</a> - - </p> - <div id="method-i-to_json_source" class="dyn-source"> - <pre><span class="ruby-comment"># File lib/json/add/range.rb, line 26</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">to_json</span>(*<span class="ruby-identifier">args</span>) - <span class="ruby-identifier">as_json</span>.<span class="ruby-identifier">to_json</span>(*<span class="ruby-identifier">args</span>) -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - </div> - </div> - </body> -</html>
\ No newline at end of file diff --git a/doc/classes/Rational.html b/doc/classes/Rational.html deleted file mode 100644 index 6972079..0000000 --- a/doc/classes/Rational.html +++ /dev/null @@ -1,227 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" - "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> -<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> -<head> - <title>Rational</title> - <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> - <link rel="stylesheet" href="../css/reset.css" type="text/css" media="screen" /> -<link rel="stylesheet" href="../css/main.css" type="text/css" media="screen" /> -<link rel="stylesheet" href="../css/github.css" type="text/css" media="screen" /> -<script src="../js/jquery-1.3.2.min.js" type="text/javascript" charset="utf-8"></script> -<script src="../js/jquery-effect.js" type="text/javascript" charset="utf-8"></script> -<script src="../js/main.js" type="text/javascript" charset="utf-8"></script> -<script src="../js/highlight.pack.js" type="text/javascript" charset="utf-8"></script> - -</head> - -<body> - <div class="banner"> - - <h1> - <span class="type">Class</span> - Rational - - <span class="parent">< - - Object - - </span> - - </h1> - <ul class="files"> - - <li><a href="../files/lib/json/add/rational_rb.html">lib/json/add/rational.rb</a></li> - - </ul> - </div> - <div id="bodyContent"> - <div id="content"> - - - - - - - - - - - - - - - <!-- Method ref --> - <div class="sectiontitle">Methods</div> - <dl class="methods"> - - <dt>A</dt> - <dd> - <ul> - - - <li> - <a href="#method-i-as_json">as_json</a> - </li> - - </ul> - </dd> - - <dt>J</dt> - <dd> - <ul> - - - <li> - <a href="#method-c-json_create">json_create</a> - </li> - - </ul> - </dd> - - <dt>T</dt> - <dd> - <ul> - - - <li> - <a href="#method-i-to_json">to_json</a> - </li> - - </ul> - </dd> - - </dl> - - - - - - - - - - - - - - - - - - - <!-- Methods --> - - <div class="sectiontitle">Class Public methods</div> - - <div class="method"> - <div class="title method-title" id="method-c-json_create"> - - <a name="method-c-json_create"></a><b>json_create</b>(object) - - </div> - - - <div class="description"> - - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-c-json_create_source')" id="l_method-c-json_create_source">show</a> - - </p> - <div id="method-c-json_create_source" class="dyn-source"> - <pre><span class="ruby-comment"># File lib/json/add/rational.rb, line 7</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">self</span>.<span class="ruby-identifier">json_create</span>(<span class="ruby-identifier">object</span>) - <span class="ruby-constant">Rational</span>(<span class="ruby-identifier">object</span>[<span class="ruby-string">'n'</span>], <span class="ruby-identifier">object</span>[<span class="ruby-string">'d'</span>]) -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - - <div class="sectiontitle">Instance Public methods</div> - - <div class="method"> - <div class="title method-title" id="method-i-as_json"> - - <a name="method-i-as_json"></a><b>as_json</b>(*) - - </div> - - - <div class="description"> - - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-as_json_source')" id="l_method-i-as_json_source">show</a> - - </p> - <div id="method-i-as_json_source" class="dyn-source"> - <pre><span class="ruby-comment"># File lib/json/add/rational.rb, line 11</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">as_json</span>(*) - { - <span class="ruby-constant">JSON</span>.<span class="ruby-identifier">create_id</span> =<span class="ruby-operator">></span> <span class="ruby-keyword">self</span>.<span class="ruby-identifier">class</span>.<span class="ruby-identifier">name</span>, - <span class="ruby-string">'n'</span> =<span class="ruby-operator">></span> <span class="ruby-identifier">numerator</span>, - <span class="ruby-string">'d'</span> =<span class="ruby-operator">></span> <span class="ruby-identifier">denominator</span>, - } -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - - <div class="method"> - <div class="title method-title" id="method-i-to_json"> - - <a name="method-i-to_json"></a><b>to_json</b>(*) - - </div> - - - <div class="description"> - - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-to_json_source')" id="l_method-i-to_json_source">show</a> - - </p> - <div id="method-i-to_json_source" class="dyn-source"> - <pre><span class="ruby-comment"># File lib/json/add/rational.rb, line 19</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">to_json</span>(*) - <span class="ruby-identifier">as_json</span>.<span class="ruby-identifier">to_json</span> -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - </div> - </div> - </body> -</html>
\ No newline at end of file diff --git a/doc/classes/Regexp.html b/doc/classes/Regexp.html deleted file mode 100644 index bf76f47..0000000 --- a/doc/classes/Regexp.html +++ /dev/null @@ -1,239 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" - "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> -<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> -<head> - <title>Regexp</title> - <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> - <link rel="stylesheet" href="../css/reset.css" type="text/css" media="screen" /> -<link rel="stylesheet" href="../css/main.css" type="text/css" media="screen" /> -<link rel="stylesheet" href="../css/github.css" type="text/css" media="screen" /> -<script src="../js/jquery-1.3.2.min.js" type="text/javascript" charset="utf-8"></script> -<script src="../js/jquery-effect.js" type="text/javascript" charset="utf-8"></script> -<script src="../js/main.js" type="text/javascript" charset="utf-8"></script> -<script src="../js/highlight.pack.js" type="text/javascript" charset="utf-8"></script> - -</head> - -<body> - <div class="banner"> - - <h1> - <span class="type">Class</span> - Regexp - - <span class="parent">< - - Object - - </span> - - </h1> - <ul class="files"> - - <li><a href="../files/lib/json/add/regexp_rb.html">lib/json/add/regexp.rb</a></li> - - </ul> - </div> - <div id="bodyContent"> - <div id="content"> - - <div class="description"> - -<p><a href="Regexp.html">Regexp</a> serialization/deserialization</p> - - </div> - - - - - - - - - - - - - - - <!-- Method ref --> - <div class="sectiontitle">Methods</div> - <dl class="methods"> - - <dt>A</dt> - <dd> - <ul> - - - <li> - <a href="#method-i-as_json">as_json</a> - </li> - - </ul> - </dd> - - <dt>J</dt> - <dd> - <ul> - - - <li> - <a href="#method-c-json_create">json_create</a> - </li> - - </ul> - </dd> - - <dt>T</dt> - <dd> - <ul> - - - <li> - <a href="#method-i-to_json">to_json</a> - </li> - - </ul> - </dd> - - </dl> - - - - - - - - - - - - - - - - - - - <!-- Methods --> - - <div class="sectiontitle">Class Public methods</div> - - <div class="method"> - <div class="title method-title" id="method-c-json_create"> - - <a name="method-c-json_create"></a><b>json_create</b>(object) - - </div> - - - <div class="description"> - <p>Deserializes <a href="JSON.html">JSON</a> string by constructing new <a -href="Regexp.html">Regexp</a> object with source <code>s</code> (<a -href="Regexp.html">Regexp</a> or String) and options <code>o</code> -serialized by <code>to_json</code></p> - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-c-json_create_source')" id="l_method-c-json_create_source">show</a> - - </p> - <div id="method-c-json_create_source" class="dyn-source"> - <pre><span class="ruby-comment"># File lib/json/add/regexp.rb, line 11</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">self</span>.<span class="ruby-identifier">json_create</span>(<span class="ruby-identifier">object</span>) - <span class="ruby-identifier">new</span>(<span class="ruby-identifier">object</span>[<span class="ruby-string">'s'</span>], <span class="ruby-identifier">object</span>[<span class="ruby-string">'o'</span>]) -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - - <div class="sectiontitle">Instance Public methods</div> - - <div class="method"> - <div class="title method-title" id="method-i-as_json"> - - <a name="method-i-as_json"></a><b>as_json</b>(*) - - </div> - - - <div class="description"> - <p>Returns a hash, that will be turned into a <a href="JSON.html">JSON</a> -object and represent this object.</p> - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-as_json_source')" id="l_method-i-as_json_source">show</a> - - </p> - <div id="method-i-as_json_source" class="dyn-source"> - <pre><span class="ruby-comment"># File lib/json/add/regexp.rb, line 17</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">as_json</span>(*) - { - <span class="ruby-constant">JSON</span>.<span class="ruby-identifier">create_id</span> =<span class="ruby-operator">></span> <span class="ruby-keyword">self</span>.<span class="ruby-identifier">class</span>.<span class="ruby-identifier">name</span>, - <span class="ruby-string">'o'</span> =<span class="ruby-operator">></span> <span class="ruby-identifier">options</span>, - <span class="ruby-string">'s'</span> =<span class="ruby-operator">></span> <span class="ruby-identifier">source</span>, - } -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - - <div class="method"> - <div class="title method-title" id="method-i-to_json"> - - <a name="method-i-to_json"></a><b>to_json</b>(*) - - </div> - - - <div class="description"> - <p>Stores class name (<a href="Regexp.html">Regexp</a>) with options -<code>o</code> and source <code>s</code> (<a href="Regexp.html">Regexp</a> -or String) as <a href="JSON.html">JSON</a> string</p> - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-to_json_source')" id="l_method-i-to_json_source">show</a> - - </p> - <div id="method-i-to_json_source" class="dyn-source"> - <pre><span class="ruby-comment"># File lib/json/add/regexp.rb, line 27</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">to_json</span>(*) - <span class="ruby-identifier">as_json</span>.<span class="ruby-identifier">to_json</span> -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - </div> - </div> - </body> -</html>
\ No newline at end of file diff --git a/doc/classes/Struct.html b/doc/classes/Struct.html deleted file mode 100644 index 8746cc4..0000000 --- a/doc/classes/Struct.html +++ /dev/null @@ -1,239 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" - "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> -<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> -<head> - <title>Struct</title> - <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> - <link rel="stylesheet" href="../css/reset.css" type="text/css" media="screen" /> -<link rel="stylesheet" href="../css/main.css" type="text/css" media="screen" /> -<link rel="stylesheet" href="../css/github.css" type="text/css" media="screen" /> -<script src="../js/jquery-1.3.2.min.js" type="text/javascript" charset="utf-8"></script> -<script src="../js/jquery-effect.js" type="text/javascript" charset="utf-8"></script> -<script src="../js/main.js" type="text/javascript" charset="utf-8"></script> -<script src="../js/highlight.pack.js" type="text/javascript" charset="utf-8"></script> - -</head> - -<body> - <div class="banner"> - - <h1> - <span class="type">Class</span> - Struct - - <span class="parent">< - - Object - - </span> - - </h1> - <ul class="files"> - - <li><a href="../files/lib/json/add/struct_rb.html">lib/json/add/struct.rb</a></li> - - </ul> - </div> - <div id="bodyContent"> - <div id="content"> - - <div class="description"> - -<p><a href="Struct.html">Struct</a> serialization/deserialization</p> - - </div> - - - - - - - - - - - - - - - <!-- Method ref --> - <div class="sectiontitle">Methods</div> - <dl class="methods"> - - <dt>A</dt> - <dd> - <ul> - - - <li> - <a href="#method-i-as_json">as_json</a> - </li> - - </ul> - </dd> - - <dt>J</dt> - <dd> - <ul> - - - <li> - <a href="#method-c-json_create">json_create</a> - </li> - - </ul> - </dd> - - <dt>T</dt> - <dd> - <ul> - - - <li> - <a href="#method-i-to_json">to_json</a> - </li> - - </ul> - </dd> - - </dl> - - - - - - - - - - - - - - - - - - - <!-- Methods --> - - <div class="sectiontitle">Class Public methods</div> - - <div class="method"> - <div class="title method-title" id="method-c-json_create"> - - <a name="method-c-json_create"></a><b>json_create</b>(object) - - </div> - - - <div class="description"> - <p>Deserializes <a href="JSON.html">JSON</a> string by constructing new <a -href="Struct.html">Struct</a> object with values <code>v</code> serialized -by <code>to_json</code>.</p> - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-c-json_create_source')" id="l_method-c-json_create_source">show</a> - - </p> - <div id="method-c-json_create_source" class="dyn-source"> - <pre><span class="ruby-comment"># File lib/json/add/struct.rb, line 10</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">self</span>.<span class="ruby-identifier">json_create</span>(<span class="ruby-identifier">object</span>) - <span class="ruby-identifier">new</span>(*<span class="ruby-identifier">object</span>[<span class="ruby-string">'v'</span>]) -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - - <div class="sectiontitle">Instance Public methods</div> - - <div class="method"> - <div class="title method-title" id="method-i-as_json"> - - <a name="method-i-as_json"></a><b>as_json</b>(*) - - </div> - - - <div class="description"> - <p>Returns a hash, that will be turned into a <a href="JSON.html">JSON</a> -object and represent this object.</p> - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-as_json_source')" id="l_method-i-as_json_source">show</a> - - </p> - <div id="method-i-as_json_source" class="dyn-source"> - <pre><span class="ruby-comment"># File lib/json/add/struct.rb, line 16</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">as_json</span>(*) - <span class="ruby-identifier">klass</span> = <span class="ruby-keyword">self</span>.<span class="ruby-identifier">class</span>.<span class="ruby-identifier">name</span> - <span class="ruby-identifier">klass</span>.<span class="ruby-identifier">to_s</span>.<span class="ruby-identifier">empty?</span> <span class="ruby-keyword">and</span> <span class="ruby-identifier">raise</span> <span class="ruby-constant">JSON</span><span class="ruby-operator">::</span><span class="ruby-constant">JSONError</span>, <span class="ruby-string">"Only named structs are supported!"</span> - { - <span class="ruby-constant">JSON</span>.<span class="ruby-identifier">create_id</span> =<span class="ruby-operator">></span> <span class="ruby-identifier">klass</span>, - <span class="ruby-string">'v'</span> =<span class="ruby-operator">></span> <span class="ruby-identifier">values</span>, - } -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - - <div class="method"> - <div class="title method-title" id="method-i-to_json"> - - <a name="method-i-to_json"></a><b>to_json</b>(*args) - - </div> - - - <div class="description"> - <p>Stores class name (<a href="Struct.html">Struct</a>) with <a -href="Struct.html">Struct</a> values <code>v</code> as a <a -href="JSON.html">JSON</a> string. Only named structs are supported.</p> - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-to_json_source')" id="l_method-i-to_json_source">show</a> - - </p> - <div id="method-i-to_json_source" class="dyn-source"> - <pre><span class="ruby-comment"># File lib/json/add/struct.rb, line 27</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">to_json</span>(*<span class="ruby-identifier">args</span>) - <span class="ruby-identifier">as_json</span>.<span class="ruby-identifier">to_json</span>(*<span class="ruby-identifier">args</span>) -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - </div> - </div> - </body> -</html>
\ No newline at end of file diff --git a/doc/classes/Symbol.html b/doc/classes/Symbol.html deleted file mode 100644 index 893cc4c..0000000 --- a/doc/classes/Symbol.html +++ /dev/null @@ -1,237 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" - "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> -<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> -<head> - <title>Symbol</title> - <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> - <link rel="stylesheet" href="../css/reset.css" type="text/css" media="screen" /> -<link rel="stylesheet" href="../css/main.css" type="text/css" media="screen" /> -<link rel="stylesheet" href="../css/github.css" type="text/css" media="screen" /> -<script src="../js/jquery-1.3.2.min.js" type="text/javascript" charset="utf-8"></script> -<script src="../js/jquery-effect.js" type="text/javascript" charset="utf-8"></script> -<script src="../js/main.js" type="text/javascript" charset="utf-8"></script> -<script src="../js/highlight.pack.js" type="text/javascript" charset="utf-8"></script> - -</head> - -<body> - <div class="banner"> - - <h1> - <span class="type">Class</span> - Symbol - - <span class="parent">< - - Object - - </span> - - </h1> - <ul class="files"> - - <li><a href="../files/lib/json/add/symbol_rb.html">lib/json/add/symbol.rb</a></li> - - </ul> - </div> - <div id="bodyContent"> - <div id="content"> - - <div class="description"> - -<p><a href="Symbol.html">Symbol</a> serialization/deserialization</p> - - </div> - - - - - - - - - - - - - - - <!-- Method ref --> - <div class="sectiontitle">Methods</div> - <dl class="methods"> - - <dt>A</dt> - <dd> - <ul> - - - <li> - <a href="#method-i-as_json">as_json</a> - </li> - - </ul> - </dd> - - <dt>J</dt> - <dd> - <ul> - - - <li> - <a href="#method-c-json_create">json_create</a> - </li> - - </ul> - </dd> - - <dt>T</dt> - <dd> - <ul> - - - <li> - <a href="#method-i-to_json">to_json</a> - </li> - - </ul> - </dd> - - </dl> - - - - - - - - - - - - - - - - - - - <!-- Methods --> - - <div class="sectiontitle">Class Public methods</div> - - <div class="method"> - <div class="title method-title" id="method-c-json_create"> - - <a name="method-c-json_create"></a><b>json_create</b>(o) - - </div> - - - <div class="description"> - <p>Deserializes <a href="JSON.html">JSON</a> string by converting the -<code>string</code> value stored in the object to a <a -href="Symbol.html">Symbol</a></p> - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-c-json_create_source')" id="l_method-c-json_create_source">show</a> - - </p> - <div id="method-c-json_create_source" class="dyn-source"> - <pre><span class="ruby-comment"># File lib/json/add/symbol.rb, line 22</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">self</span>.<span class="ruby-identifier">json_create</span>(<span class="ruby-identifier">o</span>) - <span class="ruby-identifier">o</span>[<span class="ruby-string">'s'</span>].<span class="ruby-identifier">to_sym</span> -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - - <div class="sectiontitle">Instance Public methods</div> - - <div class="method"> - <div class="title method-title" id="method-i-as_json"> - - <a name="method-i-as_json"></a><b>as_json</b>(*) - - </div> - - - <div class="description"> - <p>Returns a hash, that will be turned into a <a href="JSON.html">JSON</a> -object and represent this object.</p> - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-as_json_source')" id="l_method-i-as_json_source">show</a> - - </p> - <div id="method-i-as_json_source" class="dyn-source"> - <pre><span class="ruby-comment"># File lib/json/add/symbol.rb, line 9</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">as_json</span>(*) - { - <span class="ruby-constant">JSON</span>.<span class="ruby-identifier">create_id</span> =<span class="ruby-operator">></span> <span class="ruby-keyword">self</span>.<span class="ruby-identifier">class</span>.<span class="ruby-identifier">name</span>, - <span class="ruby-string">'s'</span> =<span class="ruby-operator">></span> <span class="ruby-identifier">to_s</span>, - } -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - - <div class="method"> - <div class="title method-title" id="method-i-to_json"> - - <a name="method-i-to_json"></a><b>to_json</b>(*a) - - </div> - - - <div class="description"> - <p>Stores class name (<a href="Symbol.html">Symbol</a>) with String -representation of <a href="Symbol.html">Symbol</a> as a <a -href="JSON.html">JSON</a> string.</p> - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-to_json_source')" id="l_method-i-to_json_source">show</a> - - </p> - <div id="method-i-to_json_source" class="dyn-source"> - <pre><span class="ruby-comment"># File lib/json/add/symbol.rb, line 17</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">to_json</span>(*<span class="ruby-identifier">a</span>) - <span class="ruby-identifier">as_json</span>.<span class="ruby-identifier">to_json</span>(*<span class="ruby-identifier">a</span>) -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - </div> - </div> - </body> -</html>
\ No newline at end of file diff --git a/doc/classes/Time.html b/doc/classes/Time.html deleted file mode 100644 index b8a1723..0000000 --- a/doc/classes/Time.html +++ /dev/null @@ -1,244 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" - "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> -<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> -<head> - <title>Time</title> - <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> - <link rel="stylesheet" href="../css/reset.css" type="text/css" media="screen" /> -<link rel="stylesheet" href="../css/main.css" type="text/css" media="screen" /> -<link rel="stylesheet" href="../css/github.css" type="text/css" media="screen" /> -<script src="../js/jquery-1.3.2.min.js" type="text/javascript" charset="utf-8"></script> -<script src="../js/jquery-effect.js" type="text/javascript" charset="utf-8"></script> -<script src="../js/main.js" type="text/javascript" charset="utf-8"></script> -<script src="../js/highlight.pack.js" type="text/javascript" charset="utf-8"></script> - -</head> - -<body> - <div class="banner"> - - <h1> - <span class="type">Class</span> - Time - - <span class="parent">< - - Object - - </span> - - </h1> - <ul class="files"> - - <li><a href="../files/lib/json/add/time_rb.html">lib/json/add/time.rb</a></li> - - </ul> - </div> - <div id="bodyContent"> - <div id="content"> - - <div class="description"> - -<p><a href="Time.html">Time</a> serialization/deserialization</p> - - </div> - - - - - - - - - - - - - - - <!-- Method ref --> - <div class="sectiontitle">Methods</div> - <dl class="methods"> - - <dt>A</dt> - <dd> - <ul> - - - <li> - <a href="#method-i-as_json">as_json</a> - </li> - - </ul> - </dd> - - <dt>J</dt> - <dd> - <ul> - - - <li> - <a href="#method-c-json_create">json_create</a> - </li> - - </ul> - </dd> - - <dt>T</dt> - <dd> - <ul> - - - <li> - <a href="#method-i-to_json">to_json</a> - </li> - - </ul> - </dd> - - </dl> - - - - - - - - - - - - - - - - - - - <!-- Methods --> - - <div class="sectiontitle">Class Public methods</div> - - <div class="method"> - <div class="title method-title" id="method-c-json_create"> - - <a name="method-c-json_create"></a><b>json_create</b>(object) - - </div> - - - <div class="description"> - <p>Deserializes <a href="JSON.html">JSON</a> string by converting time since -epoch to <a href="Time.html">Time</a></p> - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-c-json_create_source')" id="l_method-c-json_create_source">show</a> - - </p> - <div id="method-c-json_create_source" class="dyn-source"> - <pre><span class="ruby-comment"># File lib/json/add/time.rb, line 9</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">self</span>.<span class="ruby-identifier">json_create</span>(<span class="ruby-identifier">object</span>) - <span class="ruby-keyword">if</span> <span class="ruby-identifier">usec</span> = <span class="ruby-identifier">object</span>.<span class="ruby-identifier">delete</span>(<span class="ruby-string">'u'</span>) <span class="ruby-comment"># used to be tv_usec -> tv_nsec</span> - <span class="ruby-identifier">object</span>[<span class="ruby-string">'n'</span>] = <span class="ruby-identifier">usec</span> * <span class="ruby-number">1000</span> - <span class="ruby-keyword">end</span> - <span class="ruby-keyword">if</span> <span class="ruby-identifier">instance_methods</span>.<span class="ruby-identifier">include?</span>(<span class="ruby-value">:tv_nsec</span>) - <span class="ruby-identifier">at</span>(<span class="ruby-identifier">object</span>[<span class="ruby-string">'s'</span>], <span class="ruby-constant">Rational</span>(<span class="ruby-identifier">object</span>[<span class="ruby-string">'n'</span>], <span class="ruby-number">1000</span>)) - <span class="ruby-keyword">else</span> - <span class="ruby-identifier">at</span>(<span class="ruby-identifier">object</span>[<span class="ruby-string">'s'</span>], <span class="ruby-identifier">object</span>[<span class="ruby-string">'n'</span>] <span class="ruby-operator">/</span> <span class="ruby-number">1000</span>) - <span class="ruby-keyword">end</span> -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - - <div class="sectiontitle">Instance Public methods</div> - - <div class="method"> - <div class="title method-title" id="method-i-as_json"> - - <a name="method-i-as_json"></a><b>as_json</b>(*) - - </div> - - - <div class="description"> - <p>Returns a hash, that will be turned into a <a href="JSON.html">JSON</a> -object and represent this object.</p> - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-as_json_source')" id="l_method-i-as_json_source">show</a> - - </p> - <div id="method-i-as_json_source" class="dyn-source"> - <pre><span class="ruby-comment"># File lib/json/add/time.rb, line 22</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">as_json</span>(*) - { - <span class="ruby-constant">JSON</span>.<span class="ruby-identifier">create_id</span> =<span class="ruby-operator">></span> <span class="ruby-keyword">self</span>.<span class="ruby-identifier">class</span>.<span class="ruby-identifier">name</span>, - <span class="ruby-string">'s'</span> =<span class="ruby-operator">></span> <span class="ruby-identifier">tv_sec</span>, - <span class="ruby-string">'n'</span> =<span class="ruby-operator">></span> <span class="ruby-identifier">respond_to?</span>(<span class="ruby-value">:tv_nsec</span>) <span class="ruby-operator">?</span> <span class="ruby-identifier">tv_nsec</span> <span class="ruby-operator">:</span> <span class="ruby-identifier">tv_usec</span> * <span class="ruby-number">1000</span> - } -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - - <div class="method"> - <div class="title method-title" id="method-i-to_json"> - - <a name="method-i-to_json"></a><b>to_json</b>(*args) - - </div> - - - <div class="description"> - <p>Stores class name (<a href="Time.html">Time</a>) with number of seconds -since epoch and number of microseconds for <a href="Time.html">Time</a> as -<a href="JSON.html">JSON</a> string</p> - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-to_json_source')" id="l_method-i-to_json_source">show</a> - - </p> - <div id="method-i-to_json_source" class="dyn-source"> - <pre><span class="ruby-comment"># File lib/json/add/time.rb, line 32</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">to_json</span>(*<span class="ruby-identifier">args</span>) - <span class="ruby-identifier">as_json</span>.<span class="ruby-identifier">to_json</span>(*<span class="ruby-identifier">args</span>) -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - </div> - </div> - </body> -</html>
\ No newline at end of file |