Skip to content

Instantly share code, notes, and snippets.

@jgonian
jgonian / json4s-unknown-files.scala
Last active July 9, 2019 13:21
json4s printing empty values for types without formatters
/*
Given an instance of Foo which consists of a UUID and a LocalDateTime fields,
json4s will happily print empty values instead of failing when it cannot find formatters
for the specific types in scope.
*/
import $ivy.`org.json4s:json4s-core_2.12:3.5.2`
import $ivy.`org.json4s:json4s-jackson_2.12:3.5.2`
import java.util.UUID