Adding support for json input