This feels like it should be done at the serialization layer.