- splatnet3_scraper.query.JSONParser.to_csv(path)
Saves the JSON object to a CSV file.
Given the JSON Parser’s data, this method will save the data to a CSV by linearizing the JSON object. Given the following example JSON object:
>>> json = { ... "a": 1, ... "b": { ... "c": 2, ... "d": 3, ... }, ... "e": [4, 5, 6], ... "f": [ ... {"g": 7, "h": 8}, ... {"g": 9, "h": 10}, ... ], ... }The following CSV file will be created with spaces added for clarity:
>>> "a, b.c, b.d, e;0, e;1, e;2, f;0.g, f;0.h, f;1.g, f;1.h" ... "1, 2, 3, 4, 5, 6, 7, 8, 9, 10"