JsonToKotlinClass
JsonToKotlinClass copied to clipboard
π Plugin for Android Studio And IntelliJ Idea to generate Kotlin data class code from JSON text ( Json to Kotlin )
Hello everyone! I want to suggest a new approach to code generation by splitting it in two stages: 1. Restoring structures (classes and enums) from given data type: - Regular...
now we simply map the formats to types by hardcoding, this should be configurable 
* JSONSchema support remote `ref` * Correct `One Of` generation * Online bugs about JSONSchema
Split out pure Syntax tree SDK, This SDK only parse JSON/JSONSChema into Syntax Tree Structure. the structure could translate into many language Bean code(Java POJO, Kotlin Data Class, Dart Bean)...
when generating code with json like {"a":1,"a":"","b":[{"c":1},{"c":""}]}, we should keep the conflicting properties like " val a:Int , val a:String " to alert user that there are errors in raw...
Config: ```json { "uuid": "92cd94b8-3694-4115-bc08-2df21fb04a06", "pluginVersion": "3.5.0", "isPropertiesVar": false, "isCommentOff": true, "isOrderByAlphabetical": true, "propertyTypeStrategy": "Nullable", "defaultValueStrategy": "None", "targetJsonConverterLib": "MoshiCodeGen", "isInnerClassMode": true, "customAnnotationImportClassString": "import kotlinx.serialization.SerialName\nimport kotlinx.serialization.Serializable\nimport kotlinx.serialization.Optional", "customClassAnnotationFormatString": "@Serializable", "customPropertyAnnotationFormatString": "@Optional\n@SerialName(\"%s\")",...
My `~/.docker/config.json` looks similar to this: ``` { "auths": { "containers.example.io": {}, "https://containers.example.io": { "auth": "ZXhhbXBsZQo=" } }, "HttpHeaders": { "User-Agent": "Docker-Client/19.03.2 (darwin)" }, "credsStore": "desktop" } ``` .. but...
Hi, is there any chance you can add the reverse operation as well? Taking a Kotlin data class and generating valid JSON from it? It would be really useful to...
At the moment, we generate the code by manipulating string directly, which is very verbose and hard to extend, sometimes is easy to generate buggy code, so I would suggest...