<s> """<STR_LIT>""" <EOL> from decorator import decorator <EOL> import json <EOL> import webob <EOL> import warnings <EOL> import logging <EOL> log = logging . getLogger ( __name__ ) <EOL> def jsonify ( func , self , req ) : <EOL> """<STR_LIT>""" <EOL> data = func ( self , req ) <EOL> if isinstance ( data , ( list , tuple ) ) : <EOL> msg = "<STR_LIT>" "<STR_LIT>" "<STR_LIT>" <EOL> warnings . warn ( msg , Warning , <NUM_LIT:2> ) <EOL> log . warning ( msg ) <EOL> log . debug ( "<STR_LIT>" ) <EOL> resp = webob . Response ( request = req , content_type = "<STR_LIT:application/json>" ) <EOL> resp . body = json . dumps ( data ) <EOL> return resp <EOL> jsonify = decorator ( jsonify ) </s>
