blob: 3128131ee11dbf2bb8db5adc56312656136e7524 [file] [log] [blame]
<!-- HTML header for doxygen 1.8.7-->
<!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">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.16"/>
<title>RapidJSON: rapidjson::GenericReader&lt; SourceEncoding, TargetEncoding, StackAllocator &gt; Class Template Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtreedata.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(document).ready(initResizable);
/* @license-end */</script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(document).ready(function() { init_search(); });
/* @license-end */
</script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
<link href="doxygenextra.css" rel="stylesheet" type="text/css"/>
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="topbanner"><a href="https://github.com/Tencent/rapidjson" title="RapidJSON GitHub"><i class="githublogo"></i></a></div>
<div id="MSearchBox" class="MSearchBoxInactive">
<span class="left">
<img id="MSearchSelect" src="search/mag_sel.png"
onmouseover="return searchBox.OnSearchSelectShow()"
onmouseout="return searchBox.OnSearchSelectHide()"
alt=""/>
<input type="text" id="MSearchField" value="Search" accesskey="S"
onfocus="searchBox.OnSearchFieldFocus(true)"
onblur="searchBox.OnSearchFieldFocus(false)"
onkeyup="searchBox.OnSearchFieldChange(event)"/>
</span><span class="right">
<a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
</span>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.16 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
var searchBox = new SearchBox("searchBox", "search",false,'Search');
/* @license-end */
</script>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
<div id="nav-tree">
<div id="nav-tree-contents">
<div id="nav-sync" class="sync"></div>
</div>
</div>
<div id="splitbar" style="-moz-user-select:none;"
class="ui-resizable-handle">
</div>
</div>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(document).ready(function(){initNavTree('classrapidjson_1_1_generic_reader.html','');});
/* @license-end */
</script>
<div id="doc-content">
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
onmouseover="return searchBox.OnSearchSelectShow()"
onmouseout="return searchBox.OnSearchSelectHide()"
onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>
<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0"
name="MSearchResults" id="MSearchResults">
</iframe>
</div>
<div class="header">
<div class="summary">
<a href="#nested-classes">Classes</a> &#124;
<a href="#pub-types">Public Types</a> &#124;
<a href="#pub-methods">Public Member Functions</a> &#124;
<a href="#pro-methods">Protected Member Functions</a> &#124;
<a href="classrapidjson_1_1_generic_reader-members.html">List of all members</a> </div>
<div class="headertitle">
<div class="title">rapidjson::GenericReader&lt; SourceEncoding, TargetEncoding, StackAllocator &gt; Class Template Reference</div> </div>
</div><!--header-->
<div class="contents">
<p>SAX-style JSON parser. Use <a class="el" href="md_doc_sax.html#Reader">Reader</a> for <a class="el" href="structrapidjson_1_1_u_t_f8.html" title="UTF-8 encoding.">UTF8</a> encoding and default allocator.
<a href="classrapidjson_1_1_generic_reader.html#details">More...</a></p>
<p><code>#include &lt;<a class="el" href="reader_8h_source.html">reader.h</a>&gt;</code></p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-types"></a>
Public Types</h2></td></tr>
<tr class="memitem:a0781d19e8c6bc044d9cc5f5d3dde287e"><td class="memItemLeft" align="right" valign="top"><a id="a0781d19e8c6bc044d9cc5f5d3dde287e"></a>
typedef SourceEncoding::Ch&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classrapidjson_1_1_generic_reader.html#a0781d19e8c6bc044d9cc5f5d3dde287e">Ch</a></td></tr>
<tr class="memdesc:a0781d19e8c6bc044d9cc5f5d3dde287e"><td class="mdescLeft">&#160;</td><td class="mdescRight">SourceEncoding character type. <br /></td></tr>
<tr class="separator:a0781d19e8c6bc044d9cc5f5d3dde287e"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-methods"></a>
Public Member Functions</h2></td></tr>
<tr class="memitem:a56ab1065ea75167aeacb4802425bf57f"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classrapidjson_1_1_generic_reader.html#a56ab1065ea75167aeacb4802425bf57f">GenericReader</a> (StackAllocator *stackAllocator=0, size_t stackCapacity=kDefaultStackCapacity)</td></tr>
<tr class="memdesc:a56ab1065ea75167aeacb4802425bf57f"><td class="mdescLeft">&#160;</td><td class="mdescRight">Constructor. <a href="classrapidjson_1_1_generic_reader.html#a56ab1065ea75167aeacb4802425bf57f">More...</a><br /></td></tr>
<tr class="separator:a56ab1065ea75167aeacb4802425bf57f"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ac9c540b77de19661f6f45e04b9b0937b"><td class="memTemplParams" colspan="2">template&lt;unsigned parseFlags, typename InputStream , typename Handler &gt; </td></tr>
<tr class="memitem:ac9c540b77de19661f6f45e04b9b0937b"><td class="memTemplItemLeft" align="right" valign="top"><a class="el" href="group___r_a_p_i_d_j_s_o_n___e_r_r_o_r_s.html#structrapidjson_1_1_parse_result">ParseResult</a>&#160;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="classrapidjson_1_1_generic_reader.html#ac9c540b77de19661f6f45e04b9b0937b">Parse</a> (InputStream &amp;is, <a class="el" href="classrapidjson_1_1_handler.html">Handler</a> &amp;handler)</td></tr>
<tr class="memdesc:ac9c540b77de19661f6f45e04b9b0937b"><td class="mdescLeft">&#160;</td><td class="mdescRight">Parse JSON text. <a href="classrapidjson_1_1_generic_reader.html#ac9c540b77de19661f6f45e04b9b0937b">More...</a><br /></td></tr>
<tr class="separator:ac9c540b77de19661f6f45e04b9b0937b"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a2bac14d193873d661d79ad000473a908"><td class="memTemplParams" colspan="2">template&lt;typename InputStream , typename Handler &gt; </td></tr>
<tr class="memitem:a2bac14d193873d661d79ad000473a908"><td class="memTemplItemLeft" align="right" valign="top"><a class="el" href="group___r_a_p_i_d_j_s_o_n___e_r_r_o_r_s.html#structrapidjson_1_1_parse_result">ParseResult</a>&#160;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="classrapidjson_1_1_generic_reader.html#a2bac14d193873d661d79ad000473a908">Parse</a> (InputStream &amp;is, <a class="el" href="classrapidjson_1_1_handler.html">Handler</a> &amp;handler)</td></tr>
<tr class="memdesc:a2bac14d193873d661d79ad000473a908"><td class="mdescLeft">&#160;</td><td class="mdescRight">Parse JSON text (with <a class="el" href="namespacerapidjson.html#a81379eb4e94a0386d71d15fda882ebc9a5640cb00db7814b7f22be3683dda9835">kParseDefaultFlags</a>) <a href="classrapidjson_1_1_generic_reader.html#a2bac14d193873d661d79ad000473a908">More...</a><br /></td></tr>
<tr class="separator:a2bac14d193873d661d79ad000473a908"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a90403a2c55dadf82fd2bb9d4c66b3280"><td class="memItemLeft" align="right" valign="top"><a id="a90403a2c55dadf82fd2bb9d4c66b3280"></a>
void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classrapidjson_1_1_generic_reader.html#a90403a2c55dadf82fd2bb9d4c66b3280">IterativeParseInit</a> ()</td></tr>
<tr class="memdesc:a90403a2c55dadf82fd2bb9d4c66b3280"><td class="mdescLeft">&#160;</td><td class="mdescRight">Initialize JSON text token-by-token parsing. <br /></td></tr>
<tr class="separator:a90403a2c55dadf82fd2bb9d4c66b3280"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:abac6611bec17167de50fede5cd5194ca"><td class="memTemplParams" colspan="2">template&lt;unsigned parseFlags, typename InputStream , typename Handler &gt; </td></tr>
<tr class="memitem:abac6611bec17167de50fede5cd5194ca"><td class="memTemplItemLeft" align="right" valign="top">bool&#160;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="classrapidjson_1_1_generic_reader.html#abac6611bec17167de50fede5cd5194ca">IterativeParseNext</a> (InputStream &amp;is, <a class="el" href="classrapidjson_1_1_handler.html">Handler</a> &amp;handler)</td></tr>
<tr class="memdesc:abac6611bec17167de50fede5cd5194ca"><td class="mdescLeft">&#160;</td><td class="mdescRight">Parse one token from JSON text. <a href="classrapidjson_1_1_generic_reader.html#abac6611bec17167de50fede5cd5194ca">More...</a><br /></td></tr>
<tr class="separator:abac6611bec17167de50fede5cd5194ca"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a037aee35044b894d1487b42365aadc4b"><td class="memItemLeft" align="right" valign="top">RAPIDJSON_FORCEINLINE bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classrapidjson_1_1_generic_reader.html#a037aee35044b894d1487b42365aadc4b">IterativeParseComplete</a> () const</td></tr>
<tr class="memdesc:a037aee35044b894d1487b42365aadc4b"><td class="mdescLeft">&#160;</td><td class="mdescRight">Check if token-by-token parsing JSON text is complete. <a href="classrapidjson_1_1_generic_reader.html#a037aee35044b894d1487b42365aadc4b">More...</a><br /></td></tr>
<tr class="separator:a037aee35044b894d1487b42365aadc4b"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ac42370c3497a0e2b6973110f298e3a59"><td class="memItemLeft" align="right" valign="top"><a id="ac42370c3497a0e2b6973110f298e3a59"></a>
bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classrapidjson_1_1_generic_reader.html#ac42370c3497a0e2b6973110f298e3a59">HasParseError</a> () const</td></tr>
<tr class="memdesc:ac42370c3497a0e2b6973110f298e3a59"><td class="mdescLeft">&#160;</td><td class="mdescRight">Whether a parse error has occurred in the last parsing. <br /></td></tr>
<tr class="separator:ac42370c3497a0e2b6973110f298e3a59"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a042c621cf745c5ed3a6f5ff9418dd05e"><td class="memItemLeft" align="right" valign="top"><a id="a042c621cf745c5ed3a6f5ff9418dd05e"></a>
<a class="el" href="group___r_a_p_i_d_j_s_o_n___e_r_r_o_r_s.html#ga7d3acf640886b1f2552dc8c4cd6dea60">ParseErrorCode</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classrapidjson_1_1_generic_reader.html#a042c621cf745c5ed3a6f5ff9418dd05e">GetParseErrorCode</a> () const</td></tr>
<tr class="memdesc:a042c621cf745c5ed3a6f5ff9418dd05e"><td class="mdescLeft">&#160;</td><td class="mdescRight">Get the <a class="el" href="group___r_a_p_i_d_j_s_o_n___e_r_r_o_r_s.html#ga7d3acf640886b1f2552dc8c4cd6dea60">ParseErrorCode</a> of last parsing. <br /></td></tr>
<tr class="separator:a042c621cf745c5ed3a6f5ff9418dd05e"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ab50019e0a715320f83b7610b83dcef8f"><td class="memItemLeft" align="right" valign="top"><a id="ab50019e0a715320f83b7610b83dcef8f"></a>
size_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classrapidjson_1_1_generic_reader.html#ab50019e0a715320f83b7610b83dcef8f">GetErrorOffset</a> () const</td></tr>
<tr class="memdesc:ab50019e0a715320f83b7610b83dcef8f"><td class="mdescLeft">&#160;</td><td class="mdescRight">Get the position of last parsing error in input, 0 otherwise. <br /></td></tr>
<tr class="separator:ab50019e0a715320f83b7610b83dcef8f"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pro-methods"></a>
Protected Member Functions</h2></td></tr>
<tr class="memitem:a544704abdce535d93ae0f45d0cf0bc0d"><td class="memItemLeft" align="right" valign="top"><a id="a544704abdce535d93ae0f45d0cf0bc0d"></a>
void&#160;</td><td class="memItemRight" valign="bottom"><b>SetParseError</b> (<a class="el" href="group___r_a_p_i_d_j_s_o_n___e_r_r_o_r_s.html#ga7d3acf640886b1f2552dc8c4cd6dea60">ParseErrorCode</a> code, size_t offset)</td></tr>
<tr class="separator:a544704abdce535d93ae0f45d0cf0bc0d"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><h3>template&lt;typename SourceEncoding, typename TargetEncoding, typename StackAllocator = CrtAllocator&gt;<br />
class rapidjson::GenericReader&lt; SourceEncoding, TargetEncoding, StackAllocator &gt;</h3>
<p>SAX-style JSON parser. Use <a class="el" href="md_doc_sax.html#Reader">Reader</a> for <a class="el" href="structrapidjson_1_1_u_t_f8.html" title="UTF-8 encoding.">UTF8</a> encoding and default allocator. </p>
<p><a class="el" href="classrapidjson_1_1_generic_reader.html" title="SAX-style JSON parser. Use Reader for UTF8 encoding and default allocator.">GenericReader</a> parses JSON text from a stream, and send events synchronously to an object implementing <a class="el" href="classrapidjson_1_1_handler.html" title="Concept for receiving events from GenericReader upon parsing. The functions return true if no error o...">Handler</a> concept.</p>
<p>It needs to allocate a stack for storing a single decoded string during non-destructive parsing.</p>
<p>For in-situ parsing, the decoded string is directly written to the source text string, no temporary buffer is required.</p>
<p>A <a class="el" href="classrapidjson_1_1_generic_reader.html" title="SAX-style JSON parser. Use Reader for UTF8 encoding and default allocator.">GenericReader</a> object can be reused for parsing multiple JSON text.</p>
<dl class="tparams"><dt>Template Parameters</dt><dd>
<table class="tparams">
<tr><td class="paramname">SourceEncoding</td><td><a class="el" href="classrapidjson_1_1_encoding.html" title="Concept for encoding of Unicode characters.">Encoding</a> of the input stream. </td></tr>
<tr><td class="paramname">TargetEncoding</td><td><a class="el" href="classrapidjson_1_1_encoding.html" title="Concept for encoding of Unicode characters.">Encoding</a> of the parse output. </td></tr>
<tr><td class="paramname">StackAllocator</td><td><a class="el" href="classrapidjson_1_1_allocator.html" title="Concept for allocating, resizing and freeing memory block.">Allocator</a> type for stack. </td></tr>
</table>
</dd>
</dl>
</div><h2 class="groupheader">Constructor &amp; Destructor Documentation</h2>
<a id="a56ab1065ea75167aeacb4802425bf57f"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a56ab1065ea75167aeacb4802425bf57f">&#9670;&nbsp;</a></span>GenericReader()</h2>
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename SourceEncoding, typename TargetEncoding, typename StackAllocator = CrtAllocator&gt; </div>
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="classrapidjson_1_1_generic_reader.html">rapidjson::GenericReader</a>&lt; SourceEncoding, TargetEncoding, StackAllocator &gt;::<a class="el" href="classrapidjson_1_1_generic_reader.html">GenericReader</a> </td>
<td>(</td>
<td class="paramtype">StackAllocator *&#160;</td>
<td class="paramname"><em>stackAllocator</em> = <code>0</code>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">size_t&#160;</td>
<td class="paramname"><em>stackCapacity</em> = <code>kDefaultStackCapacity</code>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Constructor. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">stackAllocator</td><td>Optional allocator for allocating stack memory. (Only use for non-destructive parsing) </td></tr>
<tr><td class="paramname">stackCapacity</td><td>stack capacity in bytes for storing a single decoded string. (Only use for non-destructive parsing) </td></tr>
</table>
</dd>
</dl>
</div>
</div>
<h2 class="groupheader">Member Function Documentation</h2>
<a id="a037aee35044b894d1487b42365aadc4b"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a037aee35044b894d1487b42365aadc4b">&#9670;&nbsp;</a></span>IterativeParseComplete()</h2>
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename SourceEncoding, typename TargetEncoding, typename StackAllocator = CrtAllocator&gt; </div>
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">RAPIDJSON_FORCEINLINE bool <a class="el" href="classrapidjson_1_1_generic_reader.html">rapidjson::GenericReader</a>&lt; SourceEncoding, TargetEncoding, StackAllocator &gt;::IterativeParseComplete </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td> const</td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Check if token-by-token parsing JSON text is complete. </p>
<dl class="section return"><dt>Returns</dt><dd>Whether the JSON has been fully decoded. </dd></dl>
</div>
</div>
<a id="abac6611bec17167de50fede5cd5194ca"></a>
<h2 class="memtitle"><span class="permalink"><a href="#abac6611bec17167de50fede5cd5194ca">&#9670;&nbsp;</a></span>IterativeParseNext()</h2>
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename SourceEncoding, typename TargetEncoding, typename StackAllocator = CrtAllocator&gt; </div>
<div class="memtemplate">
template&lt;unsigned parseFlags, typename InputStream , typename Handler &gt; </div>
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">bool <a class="el" href="classrapidjson_1_1_generic_reader.html">rapidjson::GenericReader</a>&lt; SourceEncoding, TargetEncoding, StackAllocator &gt;::IterativeParseNext </td>
<td>(</td>
<td class="paramtype">InputStream &amp;&#160;</td>
<td class="paramname"><em>is</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"><a class="el" href="classrapidjson_1_1_handler.html">Handler</a> &amp;&#160;</td>
<td class="paramname"><em>handler</em>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Parse one token from JSON text. </p>
<dl class="tparams"><dt>Template Parameters</dt><dd>
<table class="tparams">
<tr><td class="paramname">InputStream</td><td>Type of input stream, implementing <a class="el" href="classrapidjson_1_1_stream.html" title="Concept for reading and writing characters.">Stream</a> concept </td></tr>
<tr><td class="paramname"><a class="el" href="classrapidjson_1_1_handler.html" title="Concept for receiving events from GenericReader upon parsing. The functions return true if no error o...">Handler</a></td><td>Type of handler, implementing <a class="el" href="classrapidjson_1_1_handler.html" title="Concept for receiving events from GenericReader upon parsing. The functions return true if no error o...">Handler</a> concept. </td></tr>
</table>
</dd>
</dl>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">is</td><td>Input stream to be parsed. </td></tr>
<tr><td class="paramname">handler</td><td>The handler to receive events. </td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>Whether the parsing is successful. </dd></dl>
</div>
</div>
<a id="ac9c540b77de19661f6f45e04b9b0937b"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ac9c540b77de19661f6f45e04b9b0937b">&#9670;&nbsp;</a></span>Parse() <span class="overload">[1/2]</span></h2>
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename SourceEncoding, typename TargetEncoding, typename StackAllocator = CrtAllocator&gt; </div>
<div class="memtemplate">
template&lt;unsigned parseFlags, typename InputStream , typename Handler &gt; </div>
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="group___r_a_p_i_d_j_s_o_n___e_r_r_o_r_s.html#structrapidjson_1_1_parse_result">ParseResult</a> <a class="el" href="classrapidjson_1_1_generic_reader.html">rapidjson::GenericReader</a>&lt; SourceEncoding, TargetEncoding, StackAllocator &gt;::Parse </td>
<td>(</td>
<td class="paramtype">InputStream &amp;&#160;</td>
<td class="paramname"><em>is</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"><a class="el" href="classrapidjson_1_1_handler.html">Handler</a> &amp;&#160;</td>
<td class="paramname"><em>handler</em>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Parse JSON text. </p>
<dl class="tparams"><dt>Template Parameters</dt><dd>
<table class="tparams">
<tr><td class="paramname">parseFlags</td><td>Combination of <a class="el" href="namespacerapidjson.html#a81379eb4e94a0386d71d15fda882ebc9">ParseFlag</a>. </td></tr>
<tr><td class="paramname">InputStream</td><td>Type of input stream, implementing <a class="el" href="classrapidjson_1_1_stream.html" title="Concept for reading and writing characters.">Stream</a> concept. </td></tr>
<tr><td class="paramname"><a class="el" href="classrapidjson_1_1_handler.html" title="Concept for receiving events from GenericReader upon parsing. The functions return true if no error o...">Handler</a></td><td>Type of handler, implementing <a class="el" href="classrapidjson_1_1_handler.html" title="Concept for receiving events from GenericReader upon parsing. The functions return true if no error o...">Handler</a> concept. </td></tr>
</table>
</dd>
</dl>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">is</td><td>Input stream to be parsed. </td></tr>
<tr><td class="paramname">handler</td><td>The handler to receive events. </td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>Whether the parsing is successful. </dd></dl>
</div>
</div>
<a id="a2bac14d193873d661d79ad000473a908"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a2bac14d193873d661d79ad000473a908">&#9670;&nbsp;</a></span>Parse() <span class="overload">[2/2]</span></h2>
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename SourceEncoding, typename TargetEncoding, typename StackAllocator = CrtAllocator&gt; </div>
<div class="memtemplate">
template&lt;typename InputStream , typename Handler &gt; </div>
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="group___r_a_p_i_d_j_s_o_n___e_r_r_o_r_s.html#structrapidjson_1_1_parse_result">ParseResult</a> <a class="el" href="classrapidjson_1_1_generic_reader.html">rapidjson::GenericReader</a>&lt; SourceEncoding, TargetEncoding, StackAllocator &gt;::Parse </td>
<td>(</td>
<td class="paramtype">InputStream &amp;&#160;</td>
<td class="paramname"><em>is</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"><a class="el" href="classrapidjson_1_1_handler.html">Handler</a> &amp;&#160;</td>
<td class="paramname"><em>handler</em>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Parse JSON text (with <a class="el" href="namespacerapidjson.html#a81379eb4e94a0386d71d15fda882ebc9a5640cb00db7814b7f22be3683dda9835">kParseDefaultFlags</a>) </p>
<dl class="tparams"><dt>Template Parameters</dt><dd>
<table class="tparams">
<tr><td class="paramname">InputStream</td><td>Type of input stream, implementing <a class="el" href="classrapidjson_1_1_stream.html" title="Concept for reading and writing characters.">Stream</a> concept </td></tr>
<tr><td class="paramname"><a class="el" href="classrapidjson_1_1_handler.html" title="Concept for receiving events from GenericReader upon parsing. The functions return true if no error o...">Handler</a></td><td>Type of handler, implementing <a class="el" href="classrapidjson_1_1_handler.html" title="Concept for receiving events from GenericReader upon parsing. The functions return true if no error o...">Handler</a> concept. </td></tr>
</table>
</dd>
</dl>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">is</td><td>Input stream to be parsed. </td></tr>
<tr><td class="paramname">handler</td><td>The handler to receive events. </td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>Whether the parsing is successful. </dd></dl>
</div>
</div>
<hr/>The documentation for this class was generated from the following files:<ul>
<li>include/rapidjson/<a class="el" href="fwd_8h_source.html">fwd.h</a></li>
<li>include/rapidjson/<a class="el" href="reader_8h_source.html">reader.h</a></li>
</ul>
</div><!-- contents -->
</div><!-- doc-content -->
<!-- HTML footer for doxygen 1.8.7-->
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
<ul>
<li class="navelem"><a class="el" href="namespacerapidjson.html">rapidjson</a></li><li class="navelem"><a class="el" href="classrapidjson_1_1_generic_reader.html">GenericReader</a></li>
</ul>
</div>
</body>
</html>