Like TaggedObject in aeson, but the name of the contents field changes depending on the tag. Perhaps DynamicTaggedObject? We'll need a way of picking out a function to determine the contents field - use a typeclass probably.
TaggedObject
aeson
DynamicTaggedObject