# HG changeset patch # User Mike Becker # Date 1765402488 -3600 # Node ID 2ebbcb38986d27e4447fbc1ba9780c7822a364c2 # Parent fb314eeca7a4e5cc7204a75d84e48a47027ad3bd fix that the docu does not explain that you must reset a parser that ran into an error diff -r fb314eeca7a4 -r 2ebbcb38986d docs/Writerside/topics/json.h.md --- a/docs/Writerside/topics/json.h.md Wed Dec 10 22:16:19 2025 +0100 +++ b/docs/Writerside/topics/json.h.md Wed Dec 10 22:34:48 2025 +0100 @@ -55,7 +55,8 @@ A complete list of all status codes can be seen [below](#list-of-status-codes). -If you want to reuse a `CxJson` structure, you can call `cxJsonReset()`, even if the last operation was a failure. +If you want to reuse a `CxJson` structure, you can call `cxJsonReset()`. +In particular, you _must_ reset the parser when the last operation was a failure. Otherwise, you need to call `cxJsonDestroy()` when you are done with the parser. The function `cxJsonFromString()` combines the above procedure. diff -r fb314eeca7a4 -r 2ebbcb38986d src/cx/json.h --- a/src/cx/json.h Wed Dec 10 22:16:19 2025 +0100 +++ b/src/cx/json.h Wed Dec 10 22:34:48 2025 +0100 @@ -495,8 +495,8 @@ /** * Destroys and re-initializes the JSON interface. * - * You might want to use this to reset the parser after - * encountering a syntax error. + * You must use this to reset the parser after encountering a syntax error + * if you want to continue using it. * * @param json the JSON interface */