Table of Contents
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!
Supported Languages
Getting Started
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 | Background image. Use url encode tool like https://www.urlencoder.org/. | .\[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!
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
Roadmap
- More Target Languages...
See the open issues for a full list of proposed features (and known issues).
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
License
Distributed under the MIT License. See LICENSE for more information.
Contact
Author
- HSING-HAN, WU (Xyphuz)
- Mail me: [email protected]
- About me: https://about.xyphuz.com
- GitHub: https://github.com/wst24365888