From 53eaee80ee4556a8dc4e0ac5158a56fd236a70c9 Mon Sep 17 00:00:00 2001 From: "pkasting@google.com" Date: Fri, 1 Aug 2008 01:48:35 +0000 Subject: Allow trailing commas in JSON responses from suggestion services. Various real-world servers return responses like this and there's no obvious reason to disallow it, even though technically it violates the JSON spec. BUG=1295216 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@217 0039d316-1c4b-4281-b951-d872f2087c98 --- chrome/browser/autocomplete/search_provider.cc | 1 + 1 file changed, 1 insertion(+) (limited to 'chrome/browser') diff --git a/chrome/browser/autocomplete/search_provider.cc b/chrome/browser/autocomplete/search_provider.cc index 40ba841..fbc24b5 100644 --- a/chrome/browser/autocomplete/search_provider.cc +++ b/chrome/browser/autocomplete/search_provider.cc @@ -136,6 +136,7 @@ void SearchProvider::OnURLFetchComplete(const URLFetcher* source, suggest_results_.clear(); navigation_results_.clear(); JSONStringValueSerializer deserializer(data); + deserializer.set_allow_trailing_comma(true); Value* root_val = NULL; have_suggest_results_ = status.is_success() && (response_code == 200) && deserializer.Deserialize(&root_val) && ParseSuggestResults(root_val); -- cgit v1.1