This is a free and open source software distributed in two languages, pt_BR and en_US. You can download its executable version (for win64 only) by clicking here, or you can follow the steps described in Default Script Execution section.
It's intention is to convert JSON datasets into your desired pattern easily. You can, for example, use a dataset that contains JSON objects like this:
[...,
{
"id": 1,
"product_name": "Chocolate Pizza",
"price": 13.89
},
...]
To, for example, a java language code like this:
...
p = new Product(1, "Chocolate Pizza", 13.89f);
...
So, for an output like above you need to provide a pattern. And this pattern would be like:
p = new Product(#id#, "#product_name#", #price#f);
- Click "Choose a File" and select a JSON formatted file.
- Type a pattern you want to convert and, in real-time, you'll see its conversion applied to the first JSON object as a model.
- Convert! Choose a path and file + extension name and save your conversion!
- Easy Peasy Lemon Squeezy!
Follow this steps if you want to execute this software as a python script.
- You will need to download a python 3 version for your desired platform first and update your pip3.
- Then you'll need to download virtualenv, if you already haven't do this.
pip3 install virtualenv
- Create a virtual environment inside this code repository directory:
python3 -m virtualenv .env
- Then enter your new environment:
windows powershell:
> .env\Scripts\activate
linux terminal:
$ source .env/bin/activate
- And download the required libs to execute Mock Converter:
pip3 install -r requirements.txt
- Then you're ready to execute:
python3 main.py