expand Writes[Keyword] instance into a Format instance

- check for types other than string, empty, and not beginning with a colon
so OK to merge ;)


2014-07-09 17:28 GMT+02:00 Daniel James <notifications@github.com>:

> In src/main/scala/play/modules/datomisca/Implicits.scala:
>
> >
> >  object Implicits {
> >
> > -  implicit val Keyword2Json = Writes[Keyword] { kw => JsString(kw.toString) }
> > +  implicit val formatKeyword = Format[Keyword](
> > +      Reads[Keyword]{
> > +        case JsString(kwStr) =>
> > +          if (kwStr.length < 2)
>
> Yeah, this was a quick way to check that the string was neither "" nor ":"
> .
>
> —
> Reply to this email directly or view it on GitHub
> <https://github.com/pellucidanalytics/play-datomisca/pull/7/files#r14716072>
> .
>