This is a custom tool I've built in order to allow for simple and intuitive JSON Serialization. This tool currently supports 4 Languages & 3 Case-Types.
Seriala is a on-the-fly Web tool that allows for instant serialisation of JSON data into classes. This tool is especially usefull to pretty much create classes on the fly with just 1 API call! The main serialisation algorithm is inside the 'converter' module, while the 'main_backend' module simply allows for hosting & requests-processing.
The main purpose of this tool is to allow developers to quickly create classes for handling JSON data in a suitable way for OOP; Avoiding potential redundancy with the manual construction of classes for diverse JSON data trees.
Currently 'Seriala' only supports 4 languages:
- Python
- JavaScript
- Java
- C#
AND 3 case-typing styles:
- Snake Case (snake_case)
- Pascal Case (PascalCase)
- Camel Case (camelCase)
- Flask
- converter.py (required by the backend)
-
On web / local server: Simply paste in the raw Json data in the appropriate field, give a class name, select both the language & case typing you'd like to use and press the 'Generate Class' button!
The class will be directly given in the 'Generated Class' box below.
============================================================================================
-
Via POST request:
To do so, make a POST request to the following IP: '{your server's ip address}/generate_class'.
Create a dictionary with the following keys:
- json_input : Your actual JSON data.
- class_name : The name of your class.
- case_style : Enter 1 of the 3 valid inputs: 'snake_case', 'pascal_case', 'camel_case'. (NON CASE SENSITIVE, _ NOT REQUIRED!)
- language : Enter the name of the wanted language: 'python', 'javascript', 'c#', 'java' . (NON CASE SENSITIVE)
Example:
Perform a POST request to the address and gather the JSON output from said request; Your class' notation will be held in the 'class_output' field.
Execute the class notation in your desired environment; Feel free to add any needed methods to the classes if needed.
The following is the output from the 'test.py' file: