Generate JSON in pretty form, and add ip address