Add json serializing.