package Ġcom . l ando op . jdbc 4 Ċ Ċ import Ġcom . fasterxml . jackson . annotation . JsonInclude Ċ import Ġcom . fasterxml . jackson . core . Json Parser Ċ import Ġcom . fasterxml . jackson . databind . Deserialization Feature Ċ import Ġcom . fasterxml . jackson . databind . ObjectMapper Ċ import Ġcom . fasterxml . jackson . module . kotlin . Kotlin Module Ċ import Ġjava . io . InputStream Ċ Ċ object ĠJack son Support Ġ{ ĊĊĠ Ġval Ġmapper : ĠObjectMapper Ġ= ĠObjectMapper (). apply Ġ{ ĊĠĠĠ Ġthis . register Module ( Kotlin Module ()) ĊĠĠĠ Ġthis . set Serialization In clusion ( JsonInclude . Include . NON _ NULL ) ĊĠĠĠ Ġthis . configure ( Deserialization Feature . FAIL _ ON _ UNKNOWN _ PROPERTIES , Ġfalse ) ĊĠĠĠ Ġthis . configure ( Deserialization Feature . FAIL _ ON _ IG NO RED _ PROPERTIES , Ġfalse ) ĊĠĠĠ Ġthis . configure ( Deserialization Feature . ACCEPT _ SINGLE _ VALUE _ AS _ ARRAY , Ġtrue ) ĊĠĠĠ Ġthis . configure ( Json Parser . Feature . ALLOW _ UN QUOT ED _ FIELD _ NAMES , Ġtrue ) ĊĠĠĠ Ġthis . configure ( Json Parser . Feature . ALLOW _ SINGLE _ QUOT ES , Ġtrue ) ĊĠ Ġ} ĊĊĠ Ġfun Ġ< T > ĠtoJson ( t : ĠT ): ĠString Ġ= Ġmapper . writeValue AsString ( t ) ĊĊĠ Ġinline Ġfun Ġ< re ified ĠT Ġ: ĠAny > Ġfrom Json ( json : ĠString ): ĠT Ġ{ ĊĠĠĠ Ġreturn Ġmapper . readValue < T >( json , ĠT :: class . java ) ĊĠ Ġ} ĊĊĠ Ġinline Ġfun Ġ< re ified ĠT Ġ: ĠAny > Ġfrom Json ( stream : ĠInputStream ): ĠT Ġ{ ĊĠĠĠ Ġreturn Ġmapper . readValue < T >( stream , ĠT :: class . java ) ĊĠ Ġ} Ċ }