Add @JsonSerialize annotations

These annotations seem to be necessary -- inheritance graph problems? No idea.

Anyway, this seems to allow correct serialization of operations. Now, it needs
tests.