Revert "Don't fight frameworks."

This reverts commit 83698961e53efc9e93d255ae72ca9ad6cb0dfda6.

This domain model is not designed to be directly serialised to
JSON (or anything else). This otherwise leads to confused
responsibilities of this component.