Added wrapper utility for converting objects to and from JSON.