package Ġnet . z om is . games . server 2 Ċ Ċ import Ġcom . fasterxml . jackson . annotation . Json Auto Detect Ċ import Ġcom . fasterxml . jackson . annotation . Property Accessor Ċ import Ġcom . fasterxml . jackson . core . type . Type Reference Ċ import Ġcom . fasterxml . jackson . databind . ser . impl . Simple Bean Property Filter Ċ import Ġcom . fasterxml . jackson . databind . ser . impl . Simple Filter Provider Ċ import Ġcom . fasterxml . jackson . module . kotlin . jackson ObjectMapper Ċ import Ġkotlin . reflect . K Visibility Ċ import Ġkotlin . reflect . full . declared Member Properties Ċ Ċ object ĠJack son Tools Ġ{ ĊĊĠĠĠ Ġprivate Ġval Ġmapper Ġ= Ġj ack son ObjectMapper () ĊĊĠĠĠ Ġfun Ġ< T > Ġread Value ( value : ĠString , Ġtarget Class : ĠClass < T >): ĠT Ġ{ ĊĠĠĠĠĠĠĠ Ġif Ġ( target Class Ġ== ĠUnit . java Class ) Ġreturn ĠUnit Ġas ĠT ĊĠĠĠĠĠĠĠ Ġreturn Ġmapper . readValue ( value , Ġtarget Class ) ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġfun Ġconvert Value ToMap ( obj : ĠAny ): ĠMap < String , ĠAny > Ġ{ ĊĠĠĠĠĠĠĠ Ġval Ġproperties Ġ= Ġobj :: class . declared Member Properties ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ. filter Ġ{ Ġit . visibility Ġ== ĠK Visibility . PUBLIC Ġ} ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ. map Ġ{ Ġit . name Ġ}. toSet () ĊĠĠĠĠĠĠĠ Ġval Ġfilters Ġ= ĠSimple Filter Provider () ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ. add Filter (" ignore Internal ", ĠSimple Bean Property Filter . filter Out All Except ( properties )) ĊĠĠĠĠĠĠĠ Ġval Ġm Ġ= Ġmapper . setVisibility ( Property Accessor . FIELD , ĠJson Auto Detect . Visibility . PUBLIC _ ONLY ) ĊĠĠĠĠĠĠĠ Ġreturn Ġm . convert Value ( obj , Ġobject : ĠType Reference < Map < String , ĠAny >>() Ġ{}) ĊĠĠĠ Ġ} Ċ Ċ } Ċ Ċ fun Ġmain () Ġ{ ĊĠĠĠ Ġval Ġconfig Ġ= ĠServer Games . setup (" Han abi ") !!. getDefault Config () ĊĠĠĠ Ġprintln ( config :: class . declared Member Properties ) ĊĠĠĠ Ġprintln ( config :: class . java . fields . toList ()) ĊĠĠĠ Ġprintln ( Jack son Tools . convert Value ToMap ( config )) Ċ Ċ }