Implement ISerializeToJson adapter.