inputand output using json for this example