update example to output json, and the readme to reflect