Update serializer and deserializer contracts; tweak annotations; add test cases