added example for json serialization