将JSON格式转换为PHP代码

时间:2018-08-08 10:10:20

标签: json

我试图创建PHP代码以反映正确的JSON格式,该格式已提供给GET数据,并在用于移动表单设计的应用程序中填充数据源。我将使用MySQL作为创建这些资源的数据库。我真正需要的是可以更改代码以符合JSON布局/结构/格式,但仅更改必要的ID,表等。这是JSON格式:

{
"DataSources":[
  {
     "Id":"JOBS",
     "Rows":[
        [
           "10011",
           "10011 - Test Generic Project",
           "TEST",
           "12345AA",
           "19 Nov 2013",
           "12 Somewhere Road"
        ],
        [
           "ZDS654",
           "ZDS654 - Maintenance Costs to Excavator",
           "TEST",
           "",
           "27 Nov 2013",
           "24 Somewhere Else Road"
        ],
        [
           "ZDF662",
           "ZDF662 - Maintenance Costs for Hitachi Excavator",
           "TEST2",
           "",
           "28 Nov 2013",
           "182 Another Place, Somewhere"
        ]
     ],
     "NewRows":[

     ],
     "DeletedRows":[

     ]
  },
  {
     "Id":"JOB-DISS",
     "Rows":[
        [
           "10011-0201",
           "Project Management",
           "10011",
           "Y"
        ],
        [
           "10011-0202",
           "Quality Control",
           "10011",
           "Y"
        ],
        [
           "10011-0251",
           "Electrical Design",
           "10011",
           "Y"
        ]
     ],
     "NewRows":[

     ],
     "DeletedRows":[

     ]
  }
  ],
  "LastUpdated":"2014-03-11T15:45:50.4818098+10:00"
  }

0 个答案:

没有答案