天道酬勤

点点滴滴的足迹,幻化成漫天的云彩
posts - 22, comments - 0, trackbacks - 0, articles - 2
  BlogJava :: 首页 :: 新随笔 :: 联系 :: 聚合  :: 管理

数据交换之JSON篇

Posted on 2011-08-28 21:24 匆匆过客 阅读(620) 评论(0)  编辑  收藏 所属分类: OOA&OODWeb
利用JSON来做HTML和SERVER之间的数据交换,尤其是SERVER向BROWSER中扔JSON,在现在的web系统非常常见,也有很多javascript支持。在HUDSON中,利用JSON来做系统update的工作,来有些新颖。节选其中一段做个存留,扩展思路。
updateCenter.post({
  
"id" : "default",
  
"signature" : {
    
"certificates" : [ "MIIE8jCCA9qgAwIBAgIBBjANBgkqhkiG9w0BAQUFADCBojELMAkGA1UEBhMCVVMxEzARBgNVBAgTCkNhbGlmb3JuaWExFDASBgNVBAcTC1NhbnRhIENsYXJhMRcwFQYDVQQKEw5IdWRzb24gcHJvamVjdDEXMBUGA1UECxMOSHVkc29uIFJvb3QgQ0ExFzAVBgNVBAMTDkh1ZHNvbiBSb290IENBMR0wGwYJKoZIhvcNAQkBFg5odWRzb25Ac3VuLmNvbTAeFw0xMDA0MTgyMzQzMzhaFw0xMTA0MTgyMzQzMzhaMIGVMQswCQYDVQQGEwJVUzETMBEGA1UECBMKQ2FsaWZvcm5pYTERMA8GA1UEBxMIU2FuIEpvc2UxDzANBgNVBAoTBkh1ZHNvbjEPMA0GA1UECxMGSHVkc29uMR0wGwYDVQQDExRIdWRzb24gVXBkYXRlIENlbnRlcjEdMBsGCSqGSIb3DQEJARYOa2tAa29oc3VrZS5vcmcwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQDUQ7uN/ZQvyHvi5UONr2CAmWfWiAPPqaF4SS7dTIaLM/sxRgnZY1k7zt/8MTce7gNOd2EyCru93EgMVY1ivEH4b9fYSlzSnu8Lx2RdMulW0iqinLY17Jv+J1qxq+tRUyMa9y3DN28sf7ydLcpEJog3Of6KL+zJlKQS0oNcgsju9LdfzccmMu8Qq3lNht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loVSEiP1BKP+k2ZUjPgAIJpNHOo3ePhjiJQt5H9vj6L7VNRQ+AoAN0wR93G69o3kji0AS2+g/YAVk0hwo8mfSKqu9bVvymcrWENilwnxgb5vvPomc9ANZkzN1SsT44i3RPiaNOporuXi1wBNq8sFuaE5D0dZlNDAfdUxKM63fYGvbvMnhlIT8ehfolRjwCTf1RcAQiBRhfPDXioRACHt0WR7+dcUBjRX9l8mfSd9veMSzCzkg==",
    
"digest" : "p2h8Fp0nO94Z6WGBzUpX3SYRFzM="
  },
  
"plugins" : {
    
"HudsonTpcPlugin" : {
      
"name" : "HudsonTpcPlugin",
      
"version" : "1.1",
      
"url" : "http://hudson-ci.org/downloads/plugins/HudsonTpcPlugin/1.1/HudsonTpcPlugin.hpi",
      
"wiki" : "http://wiki.hudson-ci.org/display/HUDSON/Team+Productivity+Center+Plugin",
      
"dependencies" : [ ],
      
"buildDate" : "Jun 20, 2011",
      
"developers" : [ {
        
"name" : "Oracle Corporation",
        
"developerId" : "oracle",
        
"email" : "Susan.Duncan@Oracle.com"
      } ],
      
"excerpt" : "This plugin publish test results of jobs to Oracle Team Productivity Center.",
      
"labels" : [ "external" ],
      
"previousTimestamp" : "2011-05-20T19:43:50.00Z",
      
"releaseTimestamp" : "2011-06-20T02:19:02.00Z",
      
"requiredCore" : "1.398",
      
"previousVersion" : "1.0",
      
"scm" : "https://svn.us.oracle.com",
      
"title" : "Oracle Team Productivity Center Plugin"
    },
    
"subversion" : {
      
"name" : "subversion",
      
"version" : "2.1.0",
      
"url" : "http://hudson-ci.org/downloads/plugins/subversion/2.1.0/subversion.hpi",
      
"wiki" : "http://wiki.hudson-ci.org//display/HUDSON/Subversion+Plugin",
      
"dependencies" : [ ],
      
"buildDate" : "July 27, 2011",
      
"developers" : [ {
        
"name" : "Anton Kozak, Nikita Levyankov, Kohsuke Kawaguchi and many others",
        
"developerId" : "antkozak, 8nevil8, kohsuke, abayer etc"
      } ],
      
"excerpt" : "This plugin adds the Subversion support (via SVNKit) to Hudson.",
      
"labels" : [ "scm" ],
      
"previousTimestamp" : "2011-05-11T19:43:50.00Z",
      
"releaseTimestamp" : "2011-06-02T02:19:02.00Z",
      
"requiredCore" : "2.1.0",
      
"previousVersion" : "2.0.1",
      
"scm" : "github.com",
      
"title" : "Subversion Plugin"
    },
    
"cvs" : {
      
"name" : "cvs",
      
"version" : "2.1.0_1",
      
"url" : "http://hudson-ci.org/downloads/plugins/cvs/2.1.0_1/cvs.hpi",
      
"wiki" : "http://wiki.hudson-ci.org//display/HUDSON/CVS+Plugin",
      
"dependencies" : [ ],
      
"buildDate" : "Aug 2, 2011",
      
"developers" : [ {
        
"name" : "Anton Kozak, Nikita Levyankov, Kohsuke Kawaguchi",
        
"developerId" : "antkozak, 8nevil8, kohsuke"
      } ],
      
"excerpt" : "This bundled plugin integrates Hudson with CVS version control system.",
      
"labels" : [ "scm" ],
      
"previousTimestamp" : "2010-05-11T21:05:36.00Z",
      
"releaseTimestamp" : "2011-06-02T20:34:18.00Z",
      
"requiredCore" : "2.1.0",
      
"previousVersion" : "2.1.0",
      
"scm" : "github.com",
      
"title" : "CVS Plugin"
    },
    
"ssh-slaves" : {
      
"name" : "ssh-slaves",
      
"version" : "2.1.0",
      
"url" : "http://hudson-ci.org/downloads/plugins/ssh-slaves/2.1.0/ssh-slaves.hpi",
      
"wiki" : "http://wiki.hudson-ci.org//display/HUDSON/SSH+Slaves+plugin",
      
"dependencies" : [ ],
      
"buildDate" : "July 27, 2011",
      
"developers" : [ {
        
"name" : "Anton Kozak, Nikita Levyankov, Kohsuke Kawaguchi",
        
"developerId" : "antkozak, 8nevil8, kohsuke"
      } ],
      
"excerpt" : "This plugin allows you to manage slaves running on \\*nix machines over SSH.",
      
"labels" : [ "slaves" ],
      
"previousTimestamp" : "2010-05-11T14:46:36.00Z",
      
"releaseTimestamp" : "2011-06-02T20:28:16.00Z",
      
"requiredCore" : "2.1.0",
      
"previousVersion" : "2.0.1",
      
"scm" : "github.com",
      
"title" : "SSH Slaves plugin"
    },
    
"git" : {
      
"name" : "git",
      
"version" : "2.1.0_1",
      
"url" : "http://hudson-ci.org/downloads/plugins/git/2.1.0_1/git.hpi",
      
"wiki" : "http://wiki.hudson-ci.org//display/HUDSON/Git+Plugin",
      
"dependencies" : [ ],
      
"buildDate" : "Aug 2, 2011",
      
"developers" : [ {
        
"name" : "Anton Kozak, Nikita Levyankov, mirko",
        
"developerId" : "antkozak, 8nevil8, mirko"
      } ],
      
"excerpt" : "This plugin allows use of <a href='http://http://git-scm.com/'>GIT</a> as a build SCM. Git 1.3.3 or newer is required. \\\\  ",
      
"labels" : [ "scm" ],
      
"previousTimestamp" : "2011-05-11T14:21:14.00Z",
      
"releaseTimestamp" : "2011-06-02T02:17:54.00Z",
      
"requiredCore" : "2.1.0",
      
"previousVersion" : "2.1.0",
      
"scm" : "github.com",
      
"title" : "Git Plugin"
    });


只有注册用户登录后才能发表评论。


网站导航: