package Ġbr . com . cross life . local . converter Ċ Ċ import Ġandroidx . room . Type Converter Ċ import Ġbr . com . cross life . local . entities . Notice Ċ import Ġbr . com . cross life . local . entities . Train Ċ import Ġcom . squareup . mos hi . M oshi ĊĊ Ċ class ĠConverter s Ġ{ ĊĊĠĠĠ Ġprivate Ġval Ġm oshi Ġ= ĠM oshi . Builder (). build () ĊĊĠĠĠ Ġ@ Type Converter ĊĠĠĠ Ġfun Ġfrom Notice ToJson ( notice : ĠNotice ) Ġ= Ġnotice . toJson () ĊĊĠĠĠ Ġ@ Type Converter ĊĠĠĠ Ġfun Ġfrom Json To Notice ( json : ĠString ) Ġ= Ġjson . to < Notice >() ĊĊĠĠĠ Ġ@ Type Converter ĊĠĠĠ Ġfun Ġfrom Train ToJson ( train : ĠTrain ) Ġ= Ġtrain . toJson () ĊĊĠĠĠ Ġ@ Type Converter ĊĠĠĠ Ġfun Ġfrom Json To Train ( json : ĠString ) Ġ= Ġjson . to < Train >() ĊĊĠĠĠ Ġprivate Ġinline Ġfun Ġ< re ified ĠT > ĠT . toJson (): ĠString Ġ= Ġm oshi . adapter ( T :: class . java ). toJson ( this ) ĊĊĠĠĠ Ġprivate Ġinline Ġfun Ġ< re ified ĠT > ĠString . to (): ĠT ? Ġ= Ġm oshi . adapter ( T :: class . java ). fromJson ( this ) Ċ } Ċ