Fix checkJsonError messages

The $value string was not set inside checkJsonError, so it was not possible to see the data which caused the error
Merge pull request #256 from Phhere/patch-1

Fix checkJsonError messages