Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-104023

Reimplement fromjson() and fromFuzzerJson() using a third-party JSON parser

    • Type: Icon: Task Task
    • Resolution: Unresolved
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: None
    • Component/s: None
    • None
    • Server Programmability
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      We should reimplement our fromjson() and fromFuzzerJson() utilities to use a third-party JSON parser. The parser at a minimum needs to support an intermediate representation of the data that we can use to build a BSONObj without inspecting the input bytes directly, or support a way to hook into parsing events such that the BSONObj can be constructed inline during parsing.

      Ideally, the library would also just support parsing directly to BSON; however, this only satisfies the requirements for fromjson(). The fromFuzzerJson() utility is an extension that is aware of domain-specific object schemas like DBRef; it may be costly to parse directly to BSON and then walk the BSONObj to detect and rewrite the domain-specific objects.

      Assuming we are able to use a third-party library to reimplement fromjson() and fromFuzzerJson(), delete JParser and JParserUtil.

            Assignee:
            Unassigned Unassigned
            Reporter:
            james.bronsted@mongodb.com James Bronsted
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated: