summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMathias <mathias@spray.cc>2012-02-03 09:40:07 +0100
committerMathias <mathias@spray.cc>2012-02-03 15:30:21 +0100
commit129760aa1a75c62e6cd2088fa6ad37ff7ee35d68 (patch)
treeb0ea9205790f8f8148f4e655fd3569d24c7fc4fc
parent86a975a4857bf6ee207e30fe4a7fc427345fb08b (diff)
downloadspray-json-129760aa1a75c62e6cd2088fa6ad37ff7ee35d68.tar.gz
spray-json-129760aa1a75c62e6cd2088fa6ad37ff7ee35d68.tar.bz2
spray-json-129760aa1a75c62e6cd2088fa6ad37ff7ee35d68.zip
Add NullOptions section to README
-rw-r--r--README.markdown11
1 files changed, 10 insertions, 1 deletions
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.