Added @throws hint to docblock comment.
Added testcase with invalid json data.