It would be better to add a filter, eg:

```scala
(__ \ "name").read[String].filter(_ == "B") 
```

That way if B and C had the same structure, it would still work.  Also, commonly the `name` property would not be useful to deserialise, especially when it came to implementing the Write, so if it were me, I'd do something like this:

```scala
case class B(foo: Int) extends A

val rb: Rule[JsValue, B] = From[JsValue] { __ =>
  ((__ \ "name").filter(_ == "B") ~> (__ \ "foo").read[Int])(B.apply _)
}
```