Use encode_json instead of OO Mojo::JSON

Object-oriented Mojo::JSON interface is deprecated