package Ġde . r ki . cor on aw arn app . covid certificate . person . model Ċ Ċ import Ġcom . fasterxml . jackson . core . Json Generator Ċ import Ġcom . fasterxml . jackson . core . Json Processing Exception Ċ import Ġcom . fasterxml . jackson . databind . Deserialization Context Ċ import Ġcom . fasterxml . jackson . databind . Json Serializer Ċ import Ġcom . fasterxml . jackson . databind . Key Deserializer Ċ import Ġcom . fasterxml . jackson . databind . Serializer Provider Ċ import Ġcom . fasterxml . jackson . databind . annotation . Json Deserialize Ċ import Ġcom . fasterxml . jackson . databind . annotation . Json Serialize Ċ import Ġcom . fasterxml . jackson . module . kotlin . readValue Ċ import Ġde . r ki . cor on aw arn app . covid certificate . common . certificate . Certificate Person Identifier Ċ import Ġde . r ki . cor on aw arn app . util . serialization . Serialization Module Ċ import Ġjava . io . IOException Ċ Ċ class ĠPerson Identifier Serializer Ġ: ĠJsonSerializer < Certificate Person Identifier >() Ġ{ ĊĠĠĠ Ġ@ Throws ( IOException :: class , ĠJson Processing Exception :: class ) ĊĠĠĠ Ġoverride Ġfun Ġserialize ( ĊĠĠĠĠĠĠĠ Ġvalue : ĠCertificate Person Identifier ?, ĊĠĠĠĠĠĠĠ Ġgen : ĠJson Generator ?, ĊĠĠĠĠĠĠĠ Ġserializers : ĠSerializer Provider ? ĊĠĠĠ Ġ) Ġ{ ĊĠĠĠĠĠĠĠ Ġgen ?. let Ġ{ Ġj Gen Ġ-> ĊĠĠĠĠĠĠĠĠĠĠĠ Ġvalue ?. let Ġ{ Ġid Ġ-> ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġj Gen . writeField Name ( Serialization Module . jackson Base Mapper . writeValue AsString ( id )) ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ} Ġ?: Ġj Gen . write Null () ĊĠĠĠĠĠĠĠ Ġ} ĊĠĠĠ Ġ} Ċ } Ċ Ċ class ĠPerson Identifier Deserializer Ġ: ĠKey Deserializer () Ġ{ ĊĠĠĠ Ġ@ Throws ( IOException :: class , ĠJson Processing Exception :: class ) ĊĠĠĠ Ġoverride Ġfun Ġdeserialize Key ( key : ĠString ?, Ġctxt : ĠDeserial ization Context ?): ĠCertificate Person Identifier ? Ġ{ ĊĠĠĠĠĠĠĠ Ġreturn Ġkey ?. let Ġ{ ĠSerialization Module . jackson Base Mapper . readValue < Certificate Person Identifier >( key ) Ġ} ĊĠĠĠ Ġ} Ċ } Ċ Ċ data Ġclass ĠSettings Map ( ĊĠĠĠ Ġ@ Json Serialize ( key Using Ġ= ĠPerson Identifier Serializer :: class ) ĊĠĠĠ Ġ@ Json Deserialize ( key Using Ġ= ĠPerson Identifier Deserializer :: class ) ĊĠĠĠ Ġval Ġsettings : ĠMap < Certificate Person Identifier , ĠPerson Settings > Ċ ) Ċ