• Stars
    star
    150
  • Rank 247,323 (Top 5 %)
  • Language
    Kotlin
  • License
    MIT License
  • Created almost 7 years ago
  • Updated over 3 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Convert JSON to Kotlin Data Classes

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