This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Not thread safe due to asJson() indentation switching, but good enough for testing | |
*/ | |
@NotThreadSafe | |
@SuppressFBWarnings(value = ["ST_WRITE_TO_STATIC_FROM_INSTANCE_METHOD"], | |
justification = "Findbugs doesn't understand Kotlin init") | |
object Json { | |
val objectMapper: ObjectMapper = ObjectMapper() | |
init { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.time.Instant | |
data class Location(@JsonProperty val userId: Int, | |
@JsonProperty val geohash: String, | |
@JsonProperty val createdAt: Instant, | |
@JsonProperty val updatedAt: Instant?) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.time.Instant | |
data class Location(@JsonProperty val userId: Int, | |
@JsonProperty val geohash: String, | |
@JsonProperty val createdAt: Instant, | |
@JsonProperty val updatedAt: Instant?) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.fasterxml.jackson.module.kotlin.test.github.failing | |
import com.fasterxml.jackson.databind.type.TypeFactory | |
import com.fasterxml.jackson.module.kotlin.KotlinModule | |
import com.fasterxml.jackson.module.kotlin.jacksonTypeRef | |
import com.fasterxml.jackson.module.kotlin.jsonMapper | |
import com.fasterxml.jackson.module.kotlin.readValue | |
import org.junit.Test | |
import kotlin.test.assertEquals |
OlderNewer