Well I don’t actually have a JSON Schema compiler yet, and I’m not sure I want to write one, but how Orsetto will handle this sort of thing is by parsing enough of the object between the delimeters to validate the syntax is well-formed, but it won’t keep the whole abstract tree around for each field. It will just memorize the stream position for the start of each field, check that all the fields conform to the object schema, then backtrack and apply the specialized parser corresponding to each field type. Ultimately, a constructor function with arguments for each of the parsed member values will be called to construct the output fo the parser as an application data type.