def append_data_to_webob_response(response, data):
 if (getattr(response, 'content_type', None) == 'application/json'):
  response_data = json.loads(response.body)
  response_data.update(data)
  response.body = json.dumps(response_data)
 return response

def append_data_to_webob_response ( response , data ) : if ( getattr ( response , 'content_type' , None ) == 'application/json' ) : response_data = json . loads ( response . body ) response_data . update ( data ) response . body = json . dumps ( response_data ) return response
appends data to a json webob response .