#NEWLINE# def default_put_view( resource , request ) : #NEWLINE# #INDENT# try : #NEWLINE# #INDENT# data = request . json_body #NEWLINE# #UNINDENT# except ValueError : #NEWLINE# #INDENT# request . response . status_int = 400 #NEWLINE# return { #NEWLINE# #INDENT# 'message' : 'No JSON data provided.' , #NEWLINE# #UNINDENT# } #NEWLINE# #UNINDENT# resource . validate ( data , partial = False ) #NEWLINE# resource . update_from_dict ( data , replace = True ) #NEWLINE# return resource . to_dict ( )