https://kotlinlang.org logo
Title
t

Tower Guidev2

02/07/2023, 9:10 PM
Hi i am looking for a tool that can transform json schema (4MB in size) to kotlin dataclasses to enable me to transform between json and kotlin all the online examples i can find either only support JSON -> Kotlin or cannot handle the size of the json schema also i have tried the intelliJ plugin in JsontoKotlinClass which generates a useless kotlin data class
a

Adam S

02/08/2023, 9:07 AM
t

Tower Guidev2

02/08/2023, 3:17 PM
@Adam S just did and got this exception
Exception in thread "main" net.pwall.json.pointer.JSONPointerException: Recursive $ref - /definitions/Extension
	at net.pwall.json.schema.parser.Parser.parseSchema(Parser.kt:175)
	at net.pwall.json.schema.parser.Parser.parseRef(Parser.kt:327)
	at net.pwall.json.schema.parser.Parser.parseSchema(Parser.kt:202)
	at net.pwall.json.schema.parser.Parser.parseItems(Parser.kt:336)
	at net.pwall.json.schema.parser.Parser.parseSchema(Parser.kt:223)
	at net.pwall.json.schema.parser.Parser.parseProperties(Parser.kt:342)
	at net.pwall.json.schema.parser.Parser.parseSchema(Parser.kt:215)
	at net.pwall.json.schema.parser.Parser.parseRef(Parser.kt:327)
	at net.pwall.json.schema.parser.Parser.parseSchema(Parser.kt:202)
	at net.pwall.json.schema.parser.Parser.parseItems(Parser.kt:336)
	at net.pwall.json.schema.parser.Parser.parseSchema(Parser.kt:223)
	at net.pwall.json.schema.parser.Parser.parseProperties(Parser.kt:342)
	at net.pwall.json.schema.parser.Parser.parseSchema(Parser.kt:215)
	at net.pwall.json.schema.parser.Parser.parseRef(Parser.kt:327)
	at net.pwall.json.schema.parser.Parser.parseSchema(Parser.kt:202)
	at net.pwall.json.schema.parser.Parser.parseProperties(Parser.kt:342)
	at net.pwall.json.schema.parser.Parser.parseSchema(Parser.kt:215)
	at net.pwall.json.schema.parser.Parser.parseRef(Parser.kt:327)
	at net.pwall.json.schema.parser.Parser.parseSchema(Parser.kt:202)
	at net.pwall.json.schema.parser.Parser.parseCombinationSchema(Parser.kt:309)
	at net.pwall.json.schema.parser.Parser.parseSchema(Parser.kt:208)
	at net.pwall.json.schema.parser.Parser.parse(Parser.kt:149)
	at net.pwall.json.schema.parser.Parser.parse(Parser.kt:120)
	at net.pwall.json.schema.codegen.CodeGenerator.addTarget(CodeGenerator.kt:478)
	at net.pwall.json.schema.codegen.CodeGenerator.addTargets(CodeGenerator.kt:370)
	at net.pwall.json.schema.codegen.CodeGenerator.addTargets$default(CodeGenerator.kt:364)
	at net.pwall.json.schema.codegen.CodeGenerator.generate(CodeGenerator.kt:354)
	at net.pwall.json.schema.codegen.CodeGenerator.generate(CodeGenerator.kt:344)
	at or.akka.stuff.MutithreadedPrimesKt.main(MutithreadedPrimes.kt:11)

Process finished with exit code 1