Adding json_or_input, a convenience for getting input data