#NEWLINE# def serialize( self ) : #NEWLINE# #INDENT# data = OrderedDict ( ) #NEWLINE# serialize_field ( self , data , DESCRIPTION ) #NEWLINE# data [ FIELDS ] = [ ] #NEWLINE# for field in self . fields : #NEWLINE# #INDENT# data [ FIELDS ] . append ( field . serialize ( ) ) #NEWLINE# #UNINDENT# if self . constraints : #NEWLINE# #INDENT# data [ CONSTRAINTS ] = [ ] #NEWLINE# for constraint in self . constraints : #NEWLINE# #INDENT# data [ CONSTRAINTS ] . append ( constraint ) #NEWLINE# #UNINDENT# #UNINDENT# return data