Instead of 

```scala
writer.acquireAndGet { w =>
  action.fold(w.print("null")) { ts =>
    w.print(ts.asJson.nospaces)
  }
```
Print folded option rather than disjoint print.