Support either serialization.