• Nigel Tao's avatar
    Have JSONParser tests use the JSONParser API · 229a3807
    Nigel Tao authored
    They no longer use the JSONReader API, other than some enum and string
    constant definitions that a later commit will hopefully move over from
    JSONReader to JSONParser, once the JSONReader call sites have been
    weaned off the JsonParseError enum (crbug.com/1070409).
    
    Originally, there was a single JSON decoder implementation, and the
    distinction between json_parser.h and json_reader.h was blurry. More
    recently (crbug.com/c/1069271), we are experimenting with alternative
    JSON decoder implementations. We may eventually settle on a winner, but
    during the transition period, there may be several implementations. The
    desired split is for json_reader.h to be the public API and for
    json_parser.h to be *a* private implementation (the existing one).
    
    In this new world, it is a layering violation for the lower level
    JSONParser code and tests to rely on the higher level JSONReader API.
    This commit helps address some of that concern: JSONParser tests now use
    the JSONParser API, apart from the enum+string caveat mentioned above.
    
    Bug: 1069271
    Bug: 1070409
    Change-Id: I5f261ae808b14997ddb748670b14ff4107f4dd33
    Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2208837Reviewed-by: default avatarRobert Sesek <rsesek@chromium.org>
    Commit-Queue: Nigel Tao <nigeltao@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#770834}
    229a3807
json_reader.h 6.85 KB