I don't think this method works. writeValue isn't valid within an object, also write(Json) is wrapped with writeObjectStart/End. Could probably be:

```java
public void write (Json json) {
   json.writeField(this, "pages");
}
```