msgid ""
msgstr ""
"Project-Id-Version: English (Boost Json Translation (zh_Hans))\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2026-06-07 10:19+0000\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: English <https://insights.cppalliance.org/weblate/projects/"
"boost-json-documentation-zh_Hans/doc-pages-io-parsing-adoc/en/>\n"
"Language: en\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=n != 1;\n"
"X-Generator: Weblate 2026.5\n"

#: :12
#, read-only, safe-html, strict-same
msgid ""
"= 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:"
msgstr ""
"= 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:"

#: :18
#, read-only, safe-html, strict-same
msgid "Name"
msgstr "Name"

#: :18
#, read-only, safe-html, strict-same
msgid "Description"
msgstr "Description"

#: :18
#, read-only, safe-html, strict-same
msgid "<<ref_basic_parser>>"
msgstr "<<ref_basic_parser>>"

#: :18
#, read-only, safe-html, strict-same
msgid ""
"A SAX push parser implementation which converts a serialized JSON text into"
msgstr ""
"A SAX push parser implementation which converts a serialized JSON text into"

#: :23
#, read-only, safe-html, strict-same
msgid ""
"a series of member function calls to a user provided handler. This allows "
"custom behaviors to be implemented for representing the document in memory."
msgstr ""
"a series of member function calls to a user provided handler. This allows "
"custom behaviors to be implemented for representing the document in memory."

#: :26
#, read-only, safe-html, strict-same
msgid "<<ref_parse_options>>"
msgstr "<<ref_parse_options>>"

#: :26
#, read-only, safe-html, strict-same
msgid "A structure used to select which extensions are enabled during parsing."
msgstr "A structure used to select which extensions are enabled during parsing."

#: :26
#, read-only, safe-html, strict-same
msgid "<<ref_parse>>"
msgstr "<<ref_parse>>"

#: :26
#, read-only, safe-html, strict-same
msgid "Parse a string containing a complete serialized JSON text, and return"
msgstr "Parse a string containing a complete serialized JSON text, and return"

#: :31
#, read-only, safe-html, strict-same
msgid "a <<ref_value>>."
msgstr "a <<ref_value>>."

#: :33
#, read-only, safe-html, strict-same
msgid "<<ref_parser>>"
msgstr "<<ref_parser>>"

#: :33
#, read-only, safe-html, strict-same
msgctxt ":33"
msgid ""
"A stateful DOM parser object which may be used to efficiently parse a series"
msgstr ""
"A stateful DOM parser object which may be used to efficiently parse a series"

#: :35
#, read-only, safe-html, strict-same
msgid ""
"of JSON texts each contained in a single contiguous character buffer, "
"returning each result as a <<ref_value>>."
msgstr ""
"of JSON texts each contained in a single contiguous character buffer, "
"returning each result as a <<ref_value>>."

#: :38
#, read-only, safe-html, strict-same
msgid "<<ref_stream_parser>>"
msgstr "<<ref_stream_parser>>"

#: :38
#, read-only, safe-html, strict-same
msgctxt ":38"
msgid ""
"A stateful DOM parser object which may be used to efficiently parse a series"
msgstr ""
"A stateful DOM parser object which may be used to efficiently parse a series"

#: :40
#, read-only, safe-html, strict-same
msgid "of JSON texts incrementally, returning each result as a <<ref_value>>."
msgstr "of JSON texts incrementally, returning each result as a <<ref_value>>."

#: :42
#, read-only, safe-html, strict-same
msgid "<<ref_value_stack>>"
msgstr "<<ref_value_stack>>"

#: :42
#, read-only, safe-html, strict-same
msgid ""
"A low level building block used for efficiently building a <<ref_value>>. The"
msgstr ""
"A low level building block used for efficiently building a <<ref_value>>. The"

#: :44
#, read-only, safe-html, strict-same
msgid ""
"parsers use this internally, and users may use it to adapt foreign parsers "
"to produce this library's containers. |==="
msgstr ""
"parsers use this internally, and users may use it to adapt foreign parsers "
"to produce this library's containers. |==="

#: :48
#, read-only, safe-html, strict-same
msgid ""
"The <<ref_parse>> function offers a simple interface for converting a "
"serialized JSON text to a <<ref_value>> in a single function call. This "
"overload uses exceptions to indicate errors:"
msgstr ""
"The <<ref_parse>> function offers a simple interface for converting a "
"serialized JSON text to a <<ref_value>> in a single function call. This "
"overload uses exceptions to indicate errors:"

#: :57
#, read-only, safe-html, strict-same
msgid "Alternatively, an {ref_error_code} can be used:"
msgstr "Alternatively, an {ref_error_code} can be used:"

#: :64
#, read-only, safe-html, strict-same
msgid ""
"Even when using error codes, exceptions thrown from the underlying "
"{ref_memory_resource} are still possible:"
msgstr ""
"Even when using error codes, exceptions thrown from the underlying "
"{ref_memory_resource} are still possible:"

#: :72
#, read-only, safe-html, strict-same
msgid ""
"The <<ref_value>> returned in the preceding examples use the "
"<<default_memory_resource,default memory resource>>. The following code uses "
"a <<ref_monotonic_resource>>, which results in faster parsing. `jv` is "
"marked `const` to prevent subsequent modification, because containers using "
"a monotonic resource waste memory when mutated."
msgstr ""
"The <<ref_value>> returned in the preceding examples use the "
"<<default_memory_resource,default memory resource>>. The following code uses "
"a <<ref_monotonic_resource>>, which results in faster parsing. `jv` is "
"marked `const` to prevent subsequent modification, because containers using "
"a monotonic resource waste memory when mutated."

#: :83
#, read-only, safe-html, strict-same
msgid "Non-Standard JSON"
msgstr "Non-Standard JSON"

#: :84
#, read-only, safe-html, strict-same
msgid ""
"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 <<ref_parse_options>> "
"structure and passing it by value. By default all extensions are disabled:"
msgstr ""
"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 <<ref_parse_options>> "
"structure and passing it by value. By default all extensions are disabled:"

#: :94
#, read-only, safe-html, strict-same
msgid ""
"When building with {cpp}20 or later, the use of https://en.cppreference.com/"
"w/cpp/language/aggregate_initialization#Designated_initializers[designated "
"initializers] with <<ref_parse_options>> is possible:"
msgstr ""
"When building with {cpp}20 or later, the use of https://en.cppreference.com/"
"w/cpp/language/aggregate_initialization#Designated_initializers[designated "
"initializers] with <<ref_parse_options>> is possible:"

#: :103
#, read-only, safe-html, strict-same
msgid ""
"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."
msgstr ""
"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."

#: :113
#, read-only, safe-html, strict-same
msgid "When enabling comment support take extra care not to drop whitespace"
msgstr "When enabling comment support take extra care not to drop whitespace"

#: :114
#, read-only, safe-html, strict-same
msgid ""
"when reading the input. For example, `std::getline` removes the endline "
"characters from the string it produces."
msgstr ""
"when reading the input. For example, `std::getline` removes the endline "
"characters from the string it produces."

#: :117
#, read-only, safe-html, strict-same
msgid "Full Precision Number Parsing"
msgstr "Full Precision Number Parsing"

#: :118
#, read-only, safe-html, strict-same
msgid ""
"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 <<ref_parse_options>> structure."
msgstr ""
"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 <<ref_parse_options>> structure."

#: :129
#, read-only, safe-html, strict-same
msgid ""
"Note that full precision number parsing requires the algorithm to see the "
"full number. This means, that when used with <<ref_stream_parser>>, "
"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."
msgstr ""
"Note that full precision number parsing requires the algorithm to see the "
"full number. This means, that when used with <<ref_stream_parser>>, "
"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."

#: :135
#, read-only, safe-html, strict-same
msgid "Parser"
msgstr "Parser"

#: :136
#, read-only, safe-html, strict-same
msgid ""
"Instances of <<ref_parser>> and <<ref_stream_parser>> offer functionality "
"beyond what is available when using the <<ref_parse>> free functions:"
msgstr ""
"Instances of <<ref_parser>> and <<ref_stream_parser>> offer functionality "
"beyond what is available when using the <<ref_parse>> free functions:"

#: :139
#, read-only, safe-html, strict-same
msgid "More control over memory"
msgstr "More control over memory"

#: :140
#, read-only, safe-html, strict-same
msgid "Streaming API, parse input JSON incrementally"
msgstr "Streaming API, parse input JSON incrementally"

#: :141
#, read-only, safe-html, strict-same
msgid "Improved performance when parsing multiple JSON texts"
msgstr "Improved performance when parsing multiple JSON texts"

#: :142
#, read-only, safe-html, strict-same
msgid "Ignore non-JSON content after the end of a JSON text"
msgstr "Ignore non-JSON content after the end of a JSON text"

#: :144
#, read-only, safe-html, strict-same
msgid ""
"The parser implementation uses temporary storage space to accumulate values "
"during parsing. When using the <<ref_parse>> free functions, this storage is "
"allocated and freed in each call. However, by declaring an instance of "
"<<ref_parser>> or <<ref_stream_parser>>, this temporary storage can be "
"reused when parsing more than one JSON text, reducing the total number of "
"dynamic memory allocations."
msgstr ""
"The parser implementation uses temporary storage space to accumulate values "
"during parsing. When using the <<ref_parse>> free functions, this storage is "
"allocated and freed in each call. However, by declaring an instance of "
"<<ref_parser>> or <<ref_stream_parser>>, this temporary storage can be "
"reused when parsing more than one JSON text, reducing the total number of "
"dynamic memory allocations."

#: :151
#, read-only, safe-html, strict-same
msgid ""
"To use the <<ref_parser>>, declare an instance. Then call "
"<<ref_parser_write>> once with the buffer containing representing the input "
"JSON. Finally, call <<ref_parser_release>> to take ownership of the "
"resulting <<ref_value>> upon success. This example persists the parser "
"instance in a class member to reuse across calls:"
msgstr ""
"To use the <<ref_parser>>, declare an instance. Then call "
"<<ref_parser_write>> once with the buffer containing representing the input "
"JSON. Finally, call <<ref_parser_release>> to take ownership of the "
"resulting <<ref_value>> upon success. This example persists the parser "
"instance in a class member to reuse across calls:"

#: :162
#, read-only, safe-html, strict-same
msgid ""
"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 <<ref_parser_write_some>>. Upon success, the return value "
"will indicate the number of characters consumed from the input, which will "
"exclude the non-JSON characters:"
msgstr ""
"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 <<ref_parser_write_some>>. Upon success, the return value "
"will indicate the number of characters consumed from the input, which will "
"exclude the non-JSON characters:"

#: :173
#, read-only, safe-html, strict-same
msgid ""
"The parser instance may be constructed with parse options which allow some "
"non-standard JSON extensions to be recognized:"
msgstr ""
"The parser instance may be constructed with parse options which allow some "
"non-standard JSON extensions to be recognized:"

#: :181
#, read-only, safe-html, strict-same
msgid "Streaming Parser"
msgstr "Streaming Parser"

#: :182
#, read-only, safe-html, strict-same
msgid ""
"The <<ref_stream_parser>> 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:"
msgstr ""
"The <<ref_stream_parser>> 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:"

#: :189
#, read-only, safe-html, strict-same
msgid "CPU consumption per I/O cycle is bounded"
msgstr "CPU consumption per I/O cycle is bounded"

#: :190
#, read-only, safe-html, strict-same
msgid "Memory consumption per I/O cycle is bounded"
msgstr "Memory consumption per I/O cycle is bounded"

#: :191
#, read-only, safe-html, strict-same
msgid "Jitter, unfairness, and latency is reduced"
msgstr "Jitter, unfairness, and latency is reduced"

#: :192
#, read-only, safe-html, strict-same
msgid "Less total memory is required to process the full input"
msgstr "Less total memory is required to process the full input"

#: :194
#, read-only, safe-html, strict-same
msgid ""
"To use the <<ref_stream_parser>>, declare an instance. Then call "
"<<ref_stream_parser_write>> zero or more times with successive buffers "
"representing the input JSON. When there are no more buffers, call "
"<<ref_stream_parser_finish>>. The function <<ref_stream_parser_done>> "
"returns `true` after a successful call to `write` or `finish` if parsing is "
"complete."
msgstr ""
"To use the <<ref_stream_parser>>, declare an instance. Then call "
"<<ref_stream_parser_write>> zero or more times with successive buffers "
"representing the input JSON. When there are no more buffers, call "
"<<ref_stream_parser_finish>>. The function <<ref_stream_parser_done>> "
"returns `true` after a successful call to `write` or `finish` if parsing is "
"complete."

#: :200
#, read-only, safe-html, strict-same
msgid ""
"In the following example a JSON text is parsed from standard input a line at "
"a time. Error codes are used instead. The function "
"<<ref_stream_parser_finish>> is used to indicate the end of the input:"
msgstr ""
"In the following example a JSON text is parsed from standard input a line at "
"a time. Error codes are used instead. The function "
"<<ref_stream_parser_finish>> is used to indicate the end of the input:"

#: :204
#, read-only, safe-html, strict-same
msgid "This example will break, if comments are enabled, because of"
msgstr "This example will break, if comments are enabled, because of"

#: :205
#, read-only, safe-html, strict-same
msgid "`std::getline` use (see the warning in <<non_standard_json>> section)."
msgstr "`std::getline` use (see the warning in <<non_standard_json>> section)."

#: :212
#, read-only, safe-html, strict-same
msgid ""
"We can complicate the example further by extracting _several_ JSON values "
"from the sequence of lines."
msgstr ""
"We can complicate the example further by extracting _several_ JSON values "
"from the sequence of lines."

#: :220
#, read-only, safe-html, strict-same
msgid "Controlling Memory"
msgstr "Controlling Memory"

#: :221
#, read-only, safe-html, strict-same
msgid ""
"After default construction, or after <<ref_stream_parser_reset>> is called "
"with no arguments, the <<ref_value>> 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 "
"<<ref_monotonic_resource>>, which is optimized for parsing but not "
"subsequent modification:"
msgstr ""
"After default construction, or after <<ref_stream_parser_reset>> is called "
"with no arguments, the <<ref_value>> 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 "
"<<ref_monotonic_resource>>, which is optimized for parsing but not "
"subsequent modification:"

#: :232
#, read-only, safe-html, strict-same
msgid ""
"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:"
msgstr ""
"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:"

#: :248
#, read-only, safe-html, strict-same
msgid "Avoiding Dynamic Allocations"
msgstr "Avoiding Dynamic Allocations"

#: :249
#, read-only, safe-html, strict-same
msgid ""
"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:"
msgstr ""
"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:"

#: :259
#, read-only, safe-html, strict-same
msgid "Custom Parsers"
msgstr "Custom Parsers"

#: :260
#, read-only, safe-html, strict-same
msgid ""
"Users who wish to implement custom parsing strategies may create their own "
"handler to use with an instance of <<ref_basic_parser>>. The handler "
"implements the function signatures required by SAX event interface. In "
"<<examples_validate>> 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."
msgstr ""
"Users who wish to implement custom parsing strategies may create their own "
"handler to use with an instance of <<ref_basic_parser>>. The handler "
"implements the function signatures required by SAX event interface. In "
"<<examples_validate>> 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."
