@@ -219,28 +219,18 @@ private constructor(
219219
220220 val bestMatches =
221221 sequenceOf(
222- if (node.isNumber) {
223- tryDeserialize(node, jacksonTypeRef<Long >())?.let {
224- ConditionalValue (number = it, _json = json)
225- }
226- } else null ,
227- if (node.isArray) {
228- tryDeserialize(node, jacksonTypeRef<List <String >>())?.let {
229- ConditionalValue (listOfStrings = it, _json = json)
230- }
231- } else null ,
232- // Try timestamp before generic string, since timestamps serialize as
233- // strings
234- if (node.isTextual) {
235- tryDeserialize(node, jacksonTypeRef<OffsetDateTime >())?.let {
236- ConditionalValue (timestamp = it, _json = json)
237- }
238- } else null ,
239- if (node.isTextual) {
240- tryDeserialize(node, jacksonTypeRef<String >())?.let {
241- ConditionalValue (regex = it, _json = json)
242- }
243- } else null ,
222+ tryDeserialize(node, jacksonTypeRef<OffsetDateTime >())?.let {
223+ ConditionalValue (timestamp = it, _json = json)
224+ },
225+ tryDeserialize(node, jacksonTypeRef<String >())?.let {
226+ ConditionalValue (regex = it, _json = json)
227+ },
228+ tryDeserialize(node, jacksonTypeRef<Long >())?.let {
229+ ConditionalValue (number = it, _json = json)
230+ },
231+ tryDeserialize(node, jacksonTypeRef<List <String >>())?.let {
232+ ConditionalValue (listOfStrings = it, _json = json)
233+ },
244234 )
245235 .filterNotNull()
246236 .allMaxBy { it.validity() }
0 commit comments