fix pickle breakage with JSONDecodeError

pickle doesn't behave correctly with custom Exceptions, we workaround the issue
by explicitly defining how to pickle JSONDecodeError.