[JSON] Display errors associated with Paths in context
When an error occurs processing a JSON object, seeing the actual surrounding data helps. Dumping just the node where the problem was identified can be too much or too little information. printErrorContext() shows the error message in its context, as a comment. JSON values along the path to the broken place are shown in some detail, the rest of the document is elided. For example: ``` { "credentials": [ { "username": /* error: expected string */ 42, "password": "secret" }, { ... } ] "backups": { ... } } ``` Differential Revision: https://reviews.llvm.org/D88103
Loading
Please sign in to comment