Incremental parsing
Feed chunks, consume balanced events, and resolve raw ranges safely.
Flyology JSON parses arbitrary UTF-8 chunks into provisional events. Its writer stages a complete document before publication. The bounded core performs no heap allocation and preserves number lexemes exactly.
Version 0.1.0-dev is available from the Flyology Alire index.
-- The chunk is the complete input, so End_Of_Input is true. Drain can
-- return several events through one public call.
Parsing.Drain (Self => Parser, Input => Chunk, End_Of_Input => True, Events => Events, Result => Result);
-- Numeric conversion is separate from parsing. Parse checks the exact
-- lexeme and the target range without rounding or modular wraparound.
Unsigned_64_JSON.Parse (Lexeme => Number, Result => Number_Result);
The writer sends ordinary compact JSON to a destination transaction. Only a successful commit publishes the document. Destination exhaustion, invalid grammar, invalid UTF-8, and invalid number spelling leave no partial document published.
Flyology JSON owns JSON syntax and octets. Your application owns input buffers, destination staging, selected token storage, and the candidate it commits after document acceptance.
Feed chunks, consume balanced events, and resolve raw ranges safely.
Implement a bounded destination and publish only complete JSON.
Collect selected fragments into caller storage and run checked integer conversion.