package Ġcom . pat res . automation . mapper Ċ Ċ import Ġcom . fasterxml . jackson . databind . Deserialization Feature Ċ import Ġcom . fasterxml . jackson . databind . Serialization Feature Ċ import Ġcom . fasterxml . jackson . module . kotlin . jackson ObjectMapper Ċ import Ġcom . fasterxml . jackson . module . kotlin . readValue Ċ Ċ object ĠAutomation Mapper Ġ{ ĊĊĠĠĠ Ġval Ġmapper Ġ= Ġj ack son ObjectMapper (). apply Ġ{ ĊĠĠĠĠĠĠĠ Ġenable ( Serialization Feature . IND ENT _ OUTPUT ) Ġ Ġ// Ġpretty - printing ĊĠĠĠĠĠĠĠ Ġdisable ( Deserialization Feature . FAIL _ ON _ UNKNOWN _ PROPERTIES ) ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġinline Ġfun Ġ< re ified ĠT > Ġto Object ( json : ĠString ): ĠT Ġ= Ġmapper . readValue ( json ) ĊĊĠĠĠ Ġfun ĠtoJson ( model : ĠAny ): ĠString Ġ= Ġmapper . writeValue AsString ( model ) Ċ Ċ }