Sorry, I'll make my remark here…

Can we not just have:

```scala
object ObjectIdJValue {
  def unapply(json: JValue): Option[ObjectId] = {
    json match {
      case JObject(JField("$oid", JString(objectIdString))) if ObjectId.isValid(objectIdString) =>
        Some(new ObjectId(objectIdString))
      case _ =>
        None
    }
  }
}
```

And use that as:

```scala
  case JArray(array) => setBox(Full(array.map {
    case JsonObjectId(objectId) => objectId
    case JsonRegex(regex) => regex
    case JsonDate(date) => date
    case other => other.values
  }))
```

(Another thing to note here: we can leave the match off of the map, since you can use pattern matching directly in the function body instead of going through the intermediate `jv` variable.)

The date is the more complicated one, because it requires a date format; I do think we can provide it to the unapply implicitly, however?