#NEWLINE# def default_post_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_child ( data ) #NEWLINE# request . response . status_int = 201 #NEWLINE# return resource . add_child ( data )