Generated-output differences

quicktype output changed between the PR base and tested PR merge revisions.
← Back to the pull request
2test cases
2files differ
0modified
2new
0deleted
34changed lines
+34 −0insertions / deletions
Base d3014aaec4f7ed11fb83168f39211b755deeeb1d · PR merge 1490e2681627a03b1b8086995091cdb3634474b0 · Head a96bd7ea3918b4e7b1c808c9eb9901dff6254ee9 · raw patch
Test case

test/inputs/json/priority/no-classes.json

1 generated file · +17 −0
Akotlindefault / TopLevel.kt+17 −0
@@ -0,0 +1,17 @@
1+// To parse the JSON, install Klaxon and do:
2+//
3+// val topLevel = TopLevel.fromJson(jsonString)
4+
5+package quicktype
6+
7+import com.beust.klaxon.*
8+
9+private val klaxon = Klaxon()
10+
11+data class TopLevel(val value: Long) {
12+ public fun toJson() = klaxon.toJsonString(value)
13+
14+ companion object {
15+ public fun fromJson(json: String) = TopLevel(json.toLong())
16+ }
17+}
Test case

test/inputs/schema/top-level-primitive.schema

1 generated file · +17 −0
Aschema-kotlindefault / TopLevel.kt+17 −0
@@ -0,0 +1,17 @@
1+// To parse the JSON, install Klaxon and do:
2+//
3+// val topLevel = TopLevel.fromJson(jsonString)
4+
5+package quicktype
6+
7+import com.beust.klaxon.*
8+
9+private val klaxon = Klaxon()
10+
11+data class TopLevel(val value: Double) {
12+ public fun toJson() = klaxon.toJsonString(value)
13+
14+ companion object {
15+ public fun fromJson(json: String) = TopLevel(json.toDouble())
16+ }
17+}
No generated files match these filters.