| Index: base/json/json_reader.h
|
| diff --git a/base/json/json_reader.h b/base/json/json_reader.h
|
| index e0811754b1957f36a4cd01b462aa835810671f25..a11102f0036e28baa8c32cd50368655826f0165c 100644
|
| --- a/base/json/json_reader.h
|
| +++ b/base/json/json_reader.h
|
| @@ -33,6 +33,7 @@
|
|
|
| #include "base/base_export.h"
|
| #include "base/basictypes.h"
|
| +#include "base/string_piece.h"
|
| #include "base/memory/scoped_ptr.h"
|
|
|
| namespace base {
|
| @@ -95,18 +96,18 @@ class BASE_EXPORT JSONReader {
|
|
|
| // Reads and parses |json|, returning a Value. The caller owns the returned
|
| // instance. If |json| is not a properly formed JSON string, returns NULL.
|
| - static Value* Read(const std::string& json);
|
| + static Value* Read(const StringPiece& json);
|
|
|
| // Reads and parses |json|, returning a Value owned by the caller. The
|
| // parser respects the given |options|. If the input is not properly formed,
|
| // returns NULL.
|
| - static Value* Read(const std::string& json, int options);
|
| + static Value* Read(const StringPiece& json, int options);
|
|
|
| // Reads and parses |json| like Read(). |error_code_out| and |error_msg_out|
|
| // are optional. If specified and NULL is returned, they will be populated
|
| // an error code and a formatted error message (including error location if
|
| // appropriate). Otherwise, they will be unmodified.
|
| - static Value* ReadAndReturnError(const std::string& json,
|
| + static Value* ReadAndReturnError(const StringPiece& json,
|
| int options, // JSONParserOptions
|
| int* error_code_out,
|
| std::string* error_msg_out);
|
|
|