Hi there, how to serialize `java.util.Date`
# kotlinx-datetime
b
Hi there, how to serialize
java.util.Date
d
Use the more modern java.time API and its
toString
and
parse
methods. You can convert
Date
to and from
java.time.Instant
. Example: https://play.kotlinlang.org/#eyJ2ZXJzaW9uIjoiMS43LjIxIiwicGxhdGZvcm0iOiJqYXZhIiwiYXJncy[…]VTdHIpXG4gICAgcHJpbnRsbihcIiRkYXRlMSwgJGRhdGUyXCIpXG59In0= Or use the
kotlinx.datetime
library instead of Java's API.