From the main screen you may paste ordinary JSON text into the text box or select one (or more) files by clicking on the "File(s)" button. The conversion will then be generated as per the options specified in the settings screen.
Use this screen to automate requests to one of more JSON URLs. The program will first pull down the JSON data from the URL and then convert the JSON to a CSV file. If you wish to combine multiple URLs into the same file, you can configure this in the [settings-paths-screen]. A special date parameter can be entered as part of the URL. {date,[date format],[days to add]} For example {date,yyyyMMdd,-3} would display the date 3 days earlier than the current date in yyyyMMdd format. This may be useful when polling API data periodically if a date parameter is required. We can also add other similar parameters if we can make things easier for you. Just let us know.
You may configure the engine to repeat the conversion of the entered list of URLs indefinitely for every specified period of time. This allows the software to behave like a timer. This may may be set in hours, seconds or minutes. It can be useful for requirements such as API logging.
This tab specifies which data should be included in the output CSV file. The first grid allows you to specify certain row values within a column. Only data matching these settings will be written to the CSV file. The second grid allows you to include (or exclude) all columns (and data below) which match the column header names in the list.
Here you may specify the folder where all CSV output files will be created. By default a new auto-generated file name will be created. However, you may also force all conversions to be written to the same file name. This is useful for logging JSON data sources. It is also useful when converting similar JSON feeds from different URLs within the [URL screen].
If a file name is specified above, you will also be presented with extra options specifying what to do if the file already exists. If "overwrite existing CSV data" is specified, the existing CSV file will first be deleted. Choose "Append CSV data to the end of the file" if you wish for all CSV data to be retained and stored within the specified file name. If CSV data is appended, you can also choose to "Remove any duplicated rows". This prevents any duplicated data from being stored in the output CSV file. This can be useful for API logging for example so that only the delta (changes) of the API data is retained.
To configure Google Sheets output, choose "Always write to the same Google Sheet".
To set this up, you must generate a "JSON key file" from your Google Account:
This screen contains settings specific to the URL conversion screen. If the website you are wishing to extract from requires credentials such as username and password, they can be specified here. If more than one URL is included in the list to convert, you can specify the number of seconds the engine should wait between each request to your URLs.
Sometimes a JSON conversion generated through the website or desktop software may contain extra unnecessary columns. This utility allows existing CSV files to be "cleaned up" by removing specified columns.
To automate your conversions, you may use the following command line syntax:
datapage.exe input.json output.csv
This will produce a new file called output.csv in the same directory as the exe. You may also provide a full path to the output file:
datapage.exe c:\somepath\input.json c:\anotherpath\output.csv
If you wish to convert a URL:
datapage.exe http://your-url.com/filename.json output.csv
Typically, you would save these commands to a batch file which could be launched by Windows Task Scheduler or another event.
By default command line conversions uses the same settings which you configured in the GUI (in File-Settings). If you wish to use bespoke settings dynamically, go to File-Settings, export your settings profile and then use the following syntax:
datapage.exe http://your-url.com/filename.json output.csv /settings=yourcustomsettings.json
Same syntax as Windows but replace datapage.exe with:
mono datapage.exe
Same syntax as Windows but replace datapage.exe with:
mono JsonToCSV.app/Contents/MonoBundle/datapage.exe
If you would like another feature, just ask us and we will try our best to find a solution for you.
If you have any questions please contact us.