File tree 1 file changed +19
-5
lines changed
src/test/kotlin/com/fasterxml/jackson/module/kotlin/test/github 1 file changed +19
-5
lines changed Original file line number Diff line number Diff line change 1
1
package com.fasterxml.jackson.module.kotlin.test.github
2
2
3
+ import com.fasterxml.jackson.annotation.JsonPropertyOrder
3
4
import com.fasterxml.jackson.core.JsonGenerator
4
5
import com.fasterxml.jackson.databind.JsonSerializer
5
6
import com.fasterxml.jackson.databind.ObjectMapper
@@ -40,7 +41,20 @@ class Github464 {
40
41
fun <T > getXyzzy () = quux
41
42
}
42
43
43
-
44
+ @JsonPropertyOrder(
45
+ " foo" ,
46
+ " bar" ,
47
+ " baz" ,
48
+ " qux" ,
49
+ " quux" ,
50
+ " corge" ,
51
+ " grault" ,
52
+ " garply" ,
53
+ " waldo" ,
54
+ " fred" ,
55
+ " plugh" ,
56
+ " xyzzy"
57
+ )
44
58
class Poko (
45
59
val foo : ValueClass ,
46
60
val bar : ValueClass ? ,
@@ -97,8 +111,8 @@ class Github464 {
97
111
"1" : null,
98
112
"null-key" : null
99
113
},
100
- "xyzzy " : 0,
101
- "plugh " : 0
114
+ "plugh " : 0,
115
+ "xyzzy " : 0
102
116
}
103
117
""" .trimIndent(),
104
118
writer.writeValueAsString(target)
@@ -139,8 +153,8 @@ class Github464 {
139
153
"1" : "null-value",
140
154
"null-key" : "null-value"
141
155
},
142
- "xyzzy " : 0,
143
- "plugh " : 0
156
+ "plugh " : 0,
157
+ "xyzzy " : 0
144
158
}
145
159
""" .trimIndent(),
146
160
writer.writeValueAsString(target)
You can’t perform that action at this time.
0 commit comments