Write out json with json writer.