Added pretty_print option to the json encoder.