Raise special exception for invalid json, fixes #30