Table of Contents
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!
Download latest executable files via: https://github.com/ez4o/convert-json-cli/releases.
convjson [OPTIONS] [INPUT_FILE_PATH] [TARGET_LANGUAGE]
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] |
.\convjson.exe -o .\out\test.dart .\in\test.json dart
.\convjson -o .\out\test.dart .\in\test.json dart
And boom!
These are some instructions on setting up your project locally, just follow these simple steps.
-
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
-
Use release command, and it will generate a executable file in root directory.
make release-windows
or
make release-linux
- More Target Languages...
See the open issues for a full list of proposed features (and known issues).
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
Distributed under the MIT License. See LICENSE for more information.
- HSING-HAN, WU (Xyphuz)
- Mail me: xyphuzwu@gmail.com
- About me: https://about.xyphuz.com
- GitHub: https://github.com/wst24365888