Fix bugs with as_json.
Update changelog.
Release 2.4.1.