diff options
Diffstat (limited to 'src/google/protobuf/util/internal/json_stream_parser.h')
-rw-r--r-- | src/google/protobuf/util/internal/json_stream_parser.h | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/src/google/protobuf/util/internal/json_stream_parser.h b/src/google/protobuf/util/internal/json_stream_parser.h index 0278c28f..31933b67 100644 --- a/src/google/protobuf/util/internal/json_stream_parser.h +++ b/src/google/protobuf/util/internal/json_stream_parser.h @@ -154,6 +154,9 @@ class LIBPROTOBUF_EXPORT JsonStreamParser { // component. util::Status ParseNumberHelper(NumberResult* result); + // Parse a number as double into a NumberResult. + util::Status ParseDoubleHelper(const string& number, NumberResult* result); + // Handles a { during parsing of a value. util::Status HandleBeginObject(); @@ -179,6 +182,10 @@ class LIBPROTOBUF_EXPORT JsonStreamParser { util::Status ParseTrue(); util::Status ParseFalse(); util::Status ParseNull(); + util::Status ParseEmptyNull(); + + // Whether an empty-null is allowed in the current state. + bool IsEmptyNullAllowed(TokenType type); // Report a failure as a util::Status. util::Status ReportFailure(StringPiece message); @@ -247,6 +254,13 @@ class LIBPROTOBUF_EXPORT JsonStreamParser { // Whether to allow non UTF-8 encoded input and replace invalid code points. bool coerce_to_utf8_; + // Whether allows empty string represented null array value or object entry + // value. + bool allow_empty_null_; + + // Whether allows out-of-range floating point numbers or reject them. + bool loose_float_number_conversion_; + GOOGLE_DISALLOW_IMPLICIT_CONSTRUCTORS(JsonStreamParser); }; |