use encode_json since Object-Oriented Mojo::JSON API is DEPRECATED