json4s Support
In analogy to the spray-json Support spray-httpx also provides the Json4sSupport and Json4sJacksonSupport
traits, which automatically provide implicit Marshaller
and Unmarshaller
instances for all types if an
implicit org.json4s.Formats
instance is in scope.
When mixing in either one of the two traits you have to implement the abstract member:
implicit def json4sFormats: Formats
with your custom logic. See the json4s documentation for more information on how to do this.
Note
Since spray-httpx only comes with an optional dependency on json4s-native and json4s-jackson you still have to add either one of them to your project yourself. Check the json4s documentation for information on how to do this.