Using JSON.dump to fix .to_json bug in encoding long byte characters