Add how to use json to define state machine.