Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@haywood
haywood / DBObjectJsValue.scala
Created April 8, 2015 03:50
Casbah DBObject/Play JsValue Conversion
/**
* This was something I explored today.
* The approach is fundamentally flawed for a couple of reasons.
*
* 1. play JSON serializes dates to strings,
* but they are better represented as timestamps or ISODates in mongo.
*
* 2. ObjectId's cannot be round-tripped, since they turn into JSON
* strings on the way out.
*

Keybase proof

I hereby claim:

  • I am haywood on github.
  • I am i_am_haywood (https://keybase.io/i_am_haywood) on keybase.
  • I have a public key whose fingerprint is 9075 69A4 289E 59CA A8E8 F304 30F1 7007 A445 EC5D

To claim this, I am signing this object: