groovy jsonbuilder与nodebuilder示例代码

代码语言:groovy

所属分类:其他

代码描述:groovy jsonbuilder与nodebuilder示例代码

代码标签: nodebuilder jsonbuilder 示例

下面为部分代码预览,完整代码请点击下载或在bfwstudio webide中打开

def builder = new groovy.json.JsonBuilder() 

def root = builder.students {
   student {
      studentname 'Joe'
      studentid '1'
		
      Marks(
         Subject1: 10,
         Subject2: 20,
         Subject3:30,
      )
   } 
} 
println(builder.toString());
def nodeBuilder = new NodeBuilder() 
.........完整代码请登录后点击上方下载按钮下载查看

网友评论0