Class JsonParser


  • public class JsonParser
    extends Object
    Simple parser for JSON. This parser is not particularly quick (though it's not slow) The focus for this parser is to faithfully record the line/col number of json elements so that the FHIR validator can report issues by line number Also, for the validator, the parser will accept duplicate property names JSON5: When running in Json5 mode, the parser accepts * unquoted strings for both fields and values * missing commas in objects and arrays * comments - anything starting // will be processed as a comma to the end of the line Other JSON5 features might be added in the future The FHIR Validator uses this parser in Json5 mode, and the object model is marked up with deviations from base JSON spec so that the validator can record them as errors (this is better than blowing up parsing the JSON)
    Author:
    grahamegrieve