From 129760aa1a75c62e6cd2088fa6ad37ff7ee35d68 Mon Sep 17 00:00:00 2001 From: Mathias Date: Fri, 3 Feb 2012 09:40:07 +0100 Subject: Add NullOptions section to README --- README.markdown | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/README.markdown b/README.markdown index cca4603..38c0739 100644 --- a/README.markdown +++ b/README.markdown @@ -10,7 +10,7 @@ It sports the following features: ### Installation -_spray-json_ is available from the [repo.spray.cc] repositories. +_spray-json_ is available from the [repo.spray.cc] repository. The latest release is `1.1.0` and is built against Scala 2.9.1. If you use SBT you can include _spray-json_ in your project with @@ -131,6 +131,15 @@ and explicitly refer to the case classes `apply` method as in this example: } +#### NullOptions + +The `NullOptions` trait supplies an alternative rendering mode for optional case class members. Normally optional +members that are undefined (`None`) are not rendered at all. By mixing in this trait into your custom JsonProtocol you +can enforce the rendering of undefined members as `null`. +(Note that this only affect JSON writing, spray-json will always read missing optional members as well as `null` +optional members as `None`.) + + ### Providing JsonFormats for other Types Of course you can also supply (de)serialization logic for types that aren't case classes. -- cgit v1.2.3