Skip to content

Commit

Permalink
re-update json config
Browse files Browse the repository at this point in the history
  • Loading branch information
Foxcapades committed Oct 24, 2023
1 parent fd42fa3 commit c7d3468
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/main/kotlin/org/veupathdb/vdi/lib/json/JSON.kt
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ import com.fasterxml.jackson.datatype.jdk8.Jdk8Module
import com.fasterxml.jackson.datatype.jsr310.JavaTimeModule
import com.fasterxml.jackson.module.kotlin.KotlinModule
import com.fasterxml.jackson.module.paramnames.ParameterNamesModule
import java.text.SimpleDateFormat
import java.util.TimeZone

/**
* Jackson Object Mapper
Expand All @@ -20,6 +22,10 @@ val JSON = JsonMapper.builder()
.addModule(JavaTimeModule())
.addModule(KotlinModule.Builder().build())
.build()!!
.also {
it.dateFormat = SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ssXXX")
it.dateFormat.timeZone = TimeZone.getDefault()
}

/**
* Writes an arbitrary value as a JSON string.
Expand Down

0 comments on commit c7d3468

Please sign in to comment.