Improve exception for illegal types for Json

Signed-off-by: nscavell <nick.scavelli@gmail.com>
Merge pull request #949 from nscavell/master

Improve exception for illegal types for Json