<?xml version="1.0" encoding="utf-8"?>
<resources>
    <string name="">= Parsing Parsing is the process where a serialized JSON text is validated and decomposed into elements. The library provides these functions and types to assist with parsing:</string>
    <string name="">Name</string>
    <string name="">Description</string>
    <string name="">&lt;&lt;ref_basic_parser&gt;&gt;</string>
    <string name="">A SAX push parser implementation which converts a serialized JSON text into</string>
    <string name="">a series of member function calls to a user provided handler. This allows custom behaviors to be implemented for representing the document in memory.</string>
    <string name="">&lt;&lt;ref_parse_options&gt;&gt;</string>
    <string name="">A structure used to select which extensions are enabled during parsing.</string>
    <string name="">&lt;&lt;ref_parse&gt;&gt;</string>
    <string name="">Parse a string containing a complete serialized JSON text, and return</string>
    <string name="">a &lt;&lt;ref_value&gt;&gt;.</string>
    <string name="">&lt;&lt;ref_parser&gt;&gt;</string>
    <string name=":33">A stateful DOM parser object which may be used to efficiently parse a series</string>
    <string name="">of JSON texts each contained in a single contiguous character buffer, returning each result as a &lt;&lt;ref_value&gt;&gt;.</string>
    <string name="">&lt;&lt;ref_stream_parser&gt;&gt;</string>
    <string name=":38">A stateful DOM parser object which may be used to efficiently parse a series</string>
    <string name="">of JSON texts incrementally, returning each result as a &lt;&lt;ref_value&gt;&gt;.</string>
    <string name="">&lt;&lt;ref_value_stack&gt;&gt;</string>
    <string name="">A low level building block used for efficiently building a &lt;&lt;ref_value&gt;&gt;. The</string>
    <string name="">parsers use this internally, and users may use it to adapt foreign parsers to produce this library\'s containers. |===</string>
    <string name="">The &lt;&lt;ref_parse&gt;&gt; function offers a simple interface for converting a serialized JSON text to a &lt;&lt;ref_value&gt;&gt; in a single function call. This overload uses exceptions to indicate errors:</string>
    <string name="">Alternatively, an {ref_error_code} can be used:</string>
    <string name="">Even when using error codes, exceptions thrown from the underlying {ref_memory_resource} are still possible:</string>
    <string name="">The &lt;&lt;ref_value&gt;&gt; returned in the preceding examples use the &lt;&lt;default_memory_resource,default memory resource&gt;&gt;. The following code uses a &lt;&lt;ref_monotonic_resource&gt;&gt;, which results in faster parsing. `jv` is marked `const` to prevent subsequent modification, because containers using a monotonic resource waste memory when mutated.</string>
    <string name="">Non-Standard JSON</string>
    <string name="">Unless otherwise specified, the parser in this library is strict. It recognizes only valid, standard JSON. The parser can be configured to allow certain non-standard extensions by filling in a &lt;&lt;ref_parse_options&gt;&gt; structure and passing it by value. By default all extensions are disabled:</string>
    <string name="">When building with {cpp}20 or later, the use of https://en.cppreference.com/w/cpp/language/aggregate_initialization#Designated_initializers[designated initializers] with &lt;&lt;ref_parse_options&gt;&gt; is possible:</string>
    <string name="">When `allow_invalid_utf16` is enabled, the parser will not throw an error in the case of illegal leading, trailing, or half a surrogate. Instead, it will replace the invalid UTF-16 code point(s) with the Unicode replacement character.</string>
    <string name="">When enabling comment support take extra care not to drop whitespace</string>
    <string name="">when reading the input. For example, `std::getline` removes the endline characters from the string it produces.</string>
    <string name="">Full Precision Number Parsing</string>
    <string name="">The default algorithm that the library uses to parse numbers is fast, but may result in slight precision loss. This may not be suitable for some applications, so there is an option to enable an alternative algorithm that doesn\'t have that flaw, but is somewhat slower. To do this, you also need to use &lt;&lt;ref_parse_options&gt;&gt; structure.</string>
    <string name="">Note that full precision number parsing requires the algorithm to see the full number. This means, that when used with &lt;&lt;ref_stream_parser&gt;&gt;, additional memory allocations may be necessary to store the number parts which were so far accepted by the parser. The library does try its best to avoid such allocations.</string>
    <string name="">Parser</string>
    <string name="">Instances of &lt;&lt;ref_parser&gt;&gt; and &lt;&lt;ref_stream_parser&gt;&gt; offer functionality beyond what is available when using the &lt;&lt;ref_parse&gt;&gt; free functions:</string>
    <string name="">More control over memory</string>
    <string name="">Streaming API, parse input JSON incrementally</string>
    <string name="">Improved performance when parsing multiple JSON texts</string>
    <string name="">Ignore non-JSON content after the end of a JSON text</string>
    <string name="">The parser implementation uses temporary storage space to accumulate values during parsing. When using the &lt;&lt;ref_parse&gt;&gt; free functions, this storage is allocated and freed in each call. However, by declaring an instance of &lt;&lt;ref_parser&gt;&gt; or &lt;&lt;ref_stream_parser&gt;&gt;, this temporary storage can be reused when parsing more than one JSON text, reducing the total number of dynamic memory allocations.</string>
    <string name="">To use the &lt;&lt;ref_parser&gt;&gt;, declare an instance. Then call &lt;&lt;ref_parser_write&gt;&gt; once with the buffer containing representing the input JSON. Finally, call &lt;&lt;ref_parser_release&gt;&gt; to take ownership of the resulting &lt;&lt;ref_value&gt;&gt; upon success. This example persists the parser instance in a class member to reuse across calls:</string>
    <string name="">Sometimes a protocol may have a JSON text followed by data that is in a different format or specification. The JSON portion can still be parsed by using the function &lt;&lt;ref_parser_write_some&gt;&gt;. Upon success, the return value will indicate the number of characters consumed from the input, which will exclude the non-JSON characters:</string>
    <string name="">The parser instance may be constructed with parse options which allow some non-standard JSON extensions to be recognized:</string>
    <string name="">Streaming Parser</string>
    <string name="">The &lt;&lt;ref_stream_parser&gt;&gt; implements a https://en.wikipedia.org/wiki/Online_algorithm[__streaming algorithm__]; it allows incremental processing of large JSON inputs using one or more contiguous character buffers. The entire input JSON does not need to be loaded into memory at once. A network server can use the streaming interface to process incoming JSON in fixed-size amounts, providing these benefits:</string>
    <string name="">CPU consumption per I/O cycle is bounded</string>
    <string name="">Memory consumption per I/O cycle is bounded</string>
    <string name="">Jitter, unfairness, and latency is reduced</string>
    <string name="">Less total memory is required to process the full input</string>
    <string name="">To use the &lt;&lt;ref_stream_parser&gt;&gt;, declare an instance. Then call &lt;&lt;ref_stream_parser_write&gt;&gt; zero or more times with successive buffers representing the input JSON. When there are no more buffers, call &lt;&lt;ref_stream_parser_finish&gt;&gt;. The function &lt;&lt;ref_stream_parser_done&gt;&gt; returns `true` after a successful call to `write` or `finish` if parsing is complete.</string>
    <string name="">In the following example a JSON text is parsed from standard input a line at a time. Error codes are used instead. The function &lt;&lt;ref_stream_parser_finish&gt;&gt; is used to indicate the end of the input:</string>
    <string name="">This example will break, if comments are enabled, because of</string>
    <string name="">`std::getline` use (see the warning in &lt;&lt;non_standard_json&gt;&gt; section).</string>
    <string name="">We can complicate the example further by extracting _several_ JSON values from the sequence of lines.</string>
    <string name="">Controlling Memory</string>
    <string name="">After default construction, or after &lt;&lt;ref_stream_parser_reset&gt;&gt; is called with no arguments, the &lt;&lt;ref_value&gt;&gt; produced after a successful parse operation uses the default memory resource. To use a different memory resource, call `reset` with the resource to use. Here we use a &lt;&lt;ref_monotonic_resource&gt;&gt;, which is optimized for parsing but not subsequent modification:</string>
    <string name="">To achieve performance and memory efficiency, the parser uses a temporary storage area to hold intermediate results. This storage is reused when parsing more than one JSON text, reducing the total number of calls to allocate memory and thus improving performance. Upon construction, the memory resource used to perform allocations for this temporary storage area may be specified. Otherwise, the default memory resource is used. In addition to a memory resource, the parser can make use of a caller-owned buffer for temporary storage. This can help avoid dynamic allocations for small inputs. The following example uses a four kilobyte temporary buffer for the parser, and falls back to the default memory resource if needed:</string>
    <string name="">Avoiding Dynamic Allocations</string>
    <string name="">Through careful specification of buffers and memory resources, it is possible to eliminate all dynamic allocation completely when parsing JSON, for the case where the entire JSON text is available in a single character buffer, as shown here:</string>
    <string name="">Custom Parsers</string>
    <string name="">Users who wish to implement custom parsing strategies may create their own handler to use with an instance of &lt;&lt;ref_basic_parser&gt;&gt;. The handler implements the function signatures required by SAX event interface. In &lt;&lt;examples_validate&gt;&gt; example we define the \"null\" parser, which throws out the parsed results, to use in the implementation of a function that determines if a JSON text is valid.</string>
</resources>
