Only JSON serialize if content_type is json.
Release v0.3.1.