Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/Ddiidev/Json2V
Convert a json to a struct in Vlang
https://github.com/Ddiidev/Json2V
js vlang
Last synced: 2 months ago
JSON representation
Convert a json to a struct in Vlang
- Host: GitHub
- URL: https://github.com/Ddiidev/Json2V
- Owner: Ddiidev
- Created: 2023-05-21T22:58:41.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2024-01-31T04:07:40.000Z (12 months ago)
- Last Synced: 2024-05-19T05:28:53.228Z (8 months ago)
- Topics: js, vlang
- Language: JavaScript
- Homepage: https://Ddiidev.github.io/Json2V/
- Size: 1.75 MB
- Stars: 23
- Watchers: 0
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
- awesome-v - json2v - Convert a json to a struct in Vlang. (Libraries / Utility)
README
# Json2V
A more complex real json that I got and tested was this one -> [CNPJ brasilapi](https://brasilapi.com.br/api/cnpj/v1/19131243000197)
Converts a json into a structure in Vlang.
The generated code can have sums of types, structs and Any{}(empty)
- [X] Key and value simple.
- [X] SumTypes for array with multiple types.
- [X] New structures for each object key.
- [X] Reserved word with _ or @.
- [X] Omitempty.
- [X] Structs anonymous.
- [X] Property name replacement.
## Start of the project
![screenshot](/assets/img1.png)
## Second stage
![screenshot](/assets/img2.gif)
## End of project
![screenshot](/assets/img3.gif)
# Stack utilizada
**Front-end:** [pico.css](https://picocss.com/), [lodash](https://lodash.com/)
**Icon:** [favicon](https://favicon.io/)
**Code editor:** [ace](https://ace.c9.io/)
**fonts:** [google fonts](https://fonts.googleapis.com)