quicktype icon indicating copy to clipboard operation
quicktype copied to clipboard

Kotlin JsonArray type does not take a parameter

Open reknoZ opened this issue 5 years ago • 1 comments

When I used your tool to generate Kotlin code based on my JSON file, the result included this line:

typealias Countries = JsonArray<Country>

But, in my version of Android Studio (3.6.3), the <Country> is flagged as an error. It seems that JsonArray cannot have a type? I'm happy to remove that, but if I can't define the typealias, then I'm not sure how to modify this line....

val countries = json.parse(Countries.serializer(), jsonString)

reknoZ avatar Apr 18 '20 12:04 reknoZ

+1

Hackerl avatar Dec 10 '25 02:12 Hackerl