package Ġit . uni bo . coord ination . l inda . logic Ċ Ċ import Ġcom . fasterxml . jackson . databind . ObjectMapper Ċ import Ġit . uni bo . presentation . Dynamic Serializer Ċ import Ġit . uni bo . presentation . MIME Types Ċ import Ġit . uni bo . tup ro log . serialize . Term Object ifier Ċ import Ġjava . util .* Ċ Ċ internal Ġclass ĠLogic Match Serializer ( mime Type : ĠMIME Types , Ġmapper : ĠObjectMapper ) Ġ: ĠDynamic Serializer < Logic Match >( mime Type , Ġmapper ) Ġ{ ĊĊĠĠĠ Ġoverride Ġfun Ġto Dynamic Object (` object `: ĠLogic Match ): ĠAny Ġ{ ĊĠĠĠĠĠĠĠ Ġval Ġmatch Map : ĠMutable Map < String , ĠAny ?> Ġ= ĠHashMap () ĊĠĠĠĠĠĠĠ Ġmatch Map [" tuple "] Ġ= Ġ` object `. tuple . map Ġ{ ĊĠĠĠĠĠĠĠĠĠĠĠ ĠPresentation . serializer Of ( Logic Tuple :: class . java , Ġsupported MIME Type ). to Dynamic Object ( it ) ĊĠĠĠĠĠĠĠ Ġ}. orElse ( null ) ĊĠĠĠĠĠĠĠ Ġmatch Map [" template "] Ġ= ĠPresentation . serializer Of ( Logic Template :: class . java , Ġsupported MIME Type ). to Dynamic Object (` object `. template ) ĊĠĠĠĠĠĠĠ Ġmatch Map [" match "] Ġ= Ġ` object `. is Matching ĊĠĠĠĠĠĠĠ Ġmatch Map [" map "] Ġ= Ġ` object `. toMap (). map Values Ġ{ ĠTerm Object ifier . default . object ify ( it . value ) Ġ} ĊĠĠĠĠĠĠĠ Ġreturn Ġmatch Map ĊĠĠĠ Ġ} Ċ }