Parsing converts a list of tokens into a structured representation. In JSON deserialization, it identifies objects, arrays, and key-value pairs after lexical analysis, then communicates discoveries to the deserializer. section 12.2.4
A JSON deserialization pipeline separates responsibilities:
- The lexer divides characters into character tokens and value tokens such as strings, numbers, Booleans, and null. section 12.2.4
- The parser interprets tokens as semantic elements and calls callbacks for simple properties, nested objects, and arrays. section 12.2.4
- The deserializer uses those parsed elements and reflection to construct Kotlin objects. section 12.2.4
Nested JSON
Parsing the JSON containing a book title and nested author identifies the title value, the author object, and the author's name before deserialization produces a Book instance. section 12.2.4












