Convert JSON to Kotlin Data Classes
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
cmdline
core
gradle/wrapper
spring
.gitignore
.travis.yml
CONTRIBUTING.md
LICENSE.txt
README.md
TODO.md
build.gradle
gradlew
gradlew.bat
settings.gradle

README.md

Json2Kotlin

Converts a JSON string into Kotlin data classes.

About

As you've probably guessed by now, this project automatically converts JSON to Kotlin source files. The tool itself is implemented 100% in Kotlin, and makes heavy use of Square's excellent KotlinPoet library.

Read the blog post which covers how this multi-platform tool was written.

View the source to suggest improvements.

Grab the command line tool from the latest release.

Get in touch on Twitter if you have questions, comments, or simply enjoy high-quality cat gifs.

Running

Run ./gradlew bootRun and visit http://localhost:8080

Releasing

Command Line

Run ./gradlew assembleDist, unzip the archive, and navigate to bin.

Then specify the json file, e.g. ./cmdline -input /c/Users/<User>/json2kotlin/bin/test.json

Spring

Deploy the JAR to AWS using ./gradlew bootRepackage