Typos fixed. Added json exception.