This is the other half of fixing #1115. Also fixed the stub for JSONDecodeError and made it only exist in 3.5+. Didn't otherwise review the exact attributes and types in the package.