convert-json-cli
convert-json-cli copied to clipboard
An excellent tool for converting json files to structs or classes in any programming language.
Table of Contents
- About The Project Supported Languages
-
Getting Started
- Usage
- Parameters
- Set Up Your Own
- Roadmap
- Contributing
- License
- Contact
About The Project
Convert-JSON-CLI is an excellent tool for converting json files to structs or classes in any programming language.
It currently only supports command line interface, but a web version will be developed in the near future!
(back to top)
Supported Languages


Getting Started
Download
Download latest executable files via: https://github.com/ez4o/convert-json-cli/releases.
Usage
convjson [OPTIONS] [INPUT_FILE_PATH] [TARGET_LANGUAGE]
Parameters
Parameter | Necessity | Description | Default Value |
---|---|---|---|
INPUT_FILE_PATH |
Required | Path to your JSON file. | None |
TARGET_LANGUAGE |
Required | Target language. Currently supports: [go] [php] [python] [c] [swift] [csharp] [protobuf] [rust] [scala] [kotlin] [cpp] [dart] [java] [typescript] |
None |
-o string |
Optional | Path to output file. | .\[INPUT_FILE_DIR].[TARGET_LANGUAGE_EXTENSION] |
Example
Windows
.\convjson.exe -o .\out\test.dart .\in\test.json dart
Linux
.\convjson -o .\out\test.dart .\in\test.json dart
And boom!
(back to top)
Set Up Your Own
These are some instructions on setting up your project locally, just follow these simple steps.
Prerequisites
Installation
-
Clone the repo.
git clone https://github.com/ez4o/convert-json-cli.git cd convert-json-cli
-
Install Go modules.
go get -u
Go module acts really different between versions, if you have any problem installing Go modules, please try:
- Upgrade Go version to
1.17.x
-
go mod tidy -compat="1.17"
-
go get -u
- Upgrade Go version to
Generate Executable File
-
Use release command, and it will generate a executable file in root directory.
make release-windows
or
make release-linux
(back to top)
Roadmap
- [ ] More Target Languages...
See the open issues for a full list of proposed features (and known issues).
(back to top)
Contributing
Contributions are what make the open source community such an amazing place to learn, inspire, and create. Any contributions you make are greatly appreciated.
If you have a suggestion that would make this better, please fork the repo and create a pull request. You can also simply open an issue with the tag "enhancement". Don't forget to give the project a star! Thanks again!
- Fork the Project
- Create your Feature Branch (
git checkout -b feat/amazing-feature
) - Commit your Changes with Conventional Commits
- Push to the Branch (
git push origin feat/amazing-feature
) - Open a Pull Request
(back to top)
License
Distributed under the MIT License. See LICENSE for more information.
(back to top)
Contact
Author
- HSING-HAN, WU (Xyphuz)
- Mail me: [email protected]
- About me: https://about.xyphuz.com
- GitHub: https://github.com/wst24365888
Project Link
(back to top)