added abstract json serialization wrapper