#NEWLINE# def NodetoJSON( node ) : #NEWLINE# #INDENT# ' convet a node to json ' #NEWLINE# jsonnode = BasetoJSON ( jsonnode , annotation . ANNO_NODE ) #NEWLINE# jsonnode . addMetadata ( 'nodetype' , node . nodetype ) #NEWLINE# jsonnode . addMetadata ( 'parentid' , node . parentid ) #NEWLINE# jsonnode . addMetadata ( 'skeletonid' , node . skeletonid ) #NEWLINE# jsonnode . addMetadata ( 'radius' , node . radius ) #NEWLINE# if ( node . children != [ ] ) : #NEWLINE# #INDENT# jsonnode . addMetadata ( 'children' , node . children ) #NEWLINE# #UNINDENT# if ( node . location != [ None , None , None ] ) : #NEWLINE# #INDENT# jsonnode . addMetadata ( 'location' , node . location ) #NEWLINE# #UNINDENT# return jsonnode