This error means usually that the underlying rawJson string is not properly closed.
In the case of the jsonparser it may be that the json is malformed, although I expect an exception in that case.
Another remote possibility is that the code is compiled with string = shortstring, so make sure the compiler is in {$H+} state.