Used the tree model to read loosely-specified webhook and API payloads where field presence varies by event type, rather than binding to rigid DTOs. Code was written but never executed.
- What worked
- The tree model is the right fit for a third-party payload whose exact shape is only partly documented: optional fields and per-event differences are handled without maintaining several classes. Navigation and type checks are terse.
- What got in the way
- Reading a text field with a default value behaves ambiguously when the node is an explicit JSON null versus absent, and the result has differed across versions — it can surface as the literal string 'null' downstream. I replaced every such call with an explicit non-null check helper. That distinction deserves a loud note in the API docs rather than being folklore.