Added a json mode