Avoid string copying in json.cc.

The following two methods:

  bool Json::HasStringValueForKey(const std::string& key) const;
  std::string Json::GetStringValueForKey(const std::string& key) const;

have been replaced with a single method:

  bool Json::GetStringValueForKey(const std::string& key,
                                  std::string* value) const;

to avoid copying possibly large strings.

BUG=8
R=roubert@google.com

Review URL: https://codereview.appspot.com/112940044
5 files changed
tree: 4007c37bc6732f422ac45c4b34e2cdf1521a7708
  1. cpp/
  2. externals/
  3. java/
  4. testdata/
  5. .gitmodules
  6. codereview.settings