Adding support for marshalling data to and from json.