Add a JSON parser to Blink |
||
Issue descriptionThis is a result of the discussion on blink-dev here: https://groups.google.com/a/chromium.org/forum/#!topic/blink-dev/yMYbwbgrCPM There is currently no JSON parser available which takes as input a WTF::String and returns a blink::JSONValue. The only method for constructing JSONValue objects seems to be from V8 objects, in blink::toJSONValue. Other parsers take base::StringPiece, or std::string, or require a running V8 context to use. The parser which used to exist has been moved to the inspector and has switched to using its own Value types, which have drifted over time away from JSONValue (using unique_ptrs, distinguishing between ints and doubles, for instance). As we'd like to start using JSON parsing for HTTP headers, (initially for Feature Policy,) the result of that discussion was that we should back-port the inspector's Values and Parser to blink.
,
Aug 5 2016
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/e0f3188369f42c0ff445a6e698b0ab4171e9ff3c commit e0f3188369f42c0ff445a6e698b0ab4171e9ff3c Author: iclelland <iclelland@chromium.org> Date: Fri Aug 05 16:29:15 2016 Port protocol::Parser to blink::JSONParser This copies the JSON parser used by the inspector into platform so that it can be used by Blink. The code is almost identical, except that it takes as input WTF::String objects and output blink::JSONValue objects. BUG= 634921 Review-Url: https://codereview.chromium.org/2209763004 Cr-Commit-Position: refs/heads/master@{#410074} [add] https://crrev.com/e0f3188369f42c0ff445a6e698b0ab4171e9ff3c/third_party/WebKit/Source/platform/JSONParser.cpp [add] https://crrev.com/e0f3188369f42c0ff445a6e698b0ab4171e9ff3c/third_party/WebKit/Source/platform/JSONParser.h [add] https://crrev.com/e0f3188369f42c0ff445a6e698b0ab4171e9ff3c/third_party/WebKit/Source/platform/JSONParserTest.cpp [modify] https://crrev.com/e0f3188369f42c0ff445a6e698b0ab4171e9ff3c/third_party/WebKit/Source/platform/blink_platform.gypi
,
Sep 27 2016
|
||
►
Sign in to add a comment |
||
Comment 1 by bugdroid1@chromium.org
, Aug 5 2016