JSON模型的绑定路径语法

2020-09-24 05:20发布

         点击此处--->   EasySAP.com群内免费提供SAP练习系统(在群公告中)

加入QQ群:457200227(SAP S4 HANA技术交流) 群内免费提供SAP练习系统(在群公告中)


如何指定此json返回的路径?

xml.view并返回JSON。

 <表
 id =" table"
 noDataText =" {worklistView>/tableNoDataText}"
 updateFinished =" onUpdateFinished"
 mode =" MultiSelect" items =" {
          路径:"/img/d/结果/行集/结果/行/结果"
 }">

 
 {
 " d":{
 "结果":[
 {
 " DateCreated":" \/Date(1520010675000)\/",
 " EndDate":" \/Date(1520010671000)\/",
 " StartDate":" \/Date(1519967471000)\/",
 "版本":" 15.0 SP9补丁3(2017年12月21日)",
 " QueryTemplate":" Interrupcoes/TelasPortal/RegistrarInterrupcao/Query/XQry_Interrupcoes_Sel_UI5",
 "行集":{
 "结果":[
 {
 " RowsetId":1
 " QueryTemplate":" Interrupcoes/TelasPortal/RegistrarInterrupcao/Query/XQry_Interrupcoes_Sel_UI5",
 "栏":{
 "结果":[
 {
 "名称":" IDINTERRUPCOES",
 "描述":" IDINTERRUPCOES",
 " MaxRange":1
 " MinRange":0,
 " SQLDataType":1
 " SourceColumn":" IDINTERRUPCOES"
 },
 {
 "名称":" DATAHORAINICIO",
 "描述":" DATAHORAINICIO",
 " MaxRange":1
 " MinRange":0,
 " SQLDataType":12
 " SourceColumn":" DATAHORAINICIO"
 },
 {
 "名称":" DATAHORATERMINO",
 "描述":" DATAHORATERMINO",
 " MaxRange":1
 " MinRange":0,
 " SQLDataType":12
 " SourceColumn":" DATAHORATERMINO"
 }
 ]
 },
 "行":{
 "结果":[
 {
 " IDINTERRUPCOES":" 0a489720-e861-11e6-cc45-cd370a020132",
 " DATAHORAINICIO":" 01/02/2017 06:00",
 " DATAHORATERMINO":" 01/02/2017 06:15",
 " RowId":1
 },
 {
 " IDINTERRUPCOES":" 19809df0-e861-11e6-81c0-cd370a020132",
 " DATAHORAINICIO":" 01/02/2017 06:16",
 " DATAHORATERMINO":" 01/12/2017 09:20",
 " RowId":2
 },
 {
 " IDINTERRUPCOES":" 70b75a10-e879-11e6-8be6-cd370a020132",
 " DATAHORAINICIO":" 01/02/2017 09:24",
 " DATAHORATERMINO":" 01/02/2017 11:00",
 " RowId":3
 }
 ]
 }
 }
 ]
 },
 "消息":{
 "结果":[]
 }
 }
 ]
 }
 } 

         点击此处--->   EasySAP.com群内免费提供SAP练习系统(在群公告中)

加入QQ群:457200227(SAP S4 HANA技术交流) 群内免费提供SAP练习系统(在群公告中)


如何指定此json返回的路径?

xml.view并返回JSON。

 <表
 id =" table"
 noDataText =" {worklistView>/tableNoDataText}"
 updateFinished =" onUpdateFinished"
 mode =" MultiSelect" items =" {
          路径:"/img/d/结果/行集/结果/行/结果"
 }">

 
 {
 " d":{
 "结果":[
 {
 " DateCreated":" \/Date(1520010675000)\/",
 " EndDate":" \/Date(1520010671000)\/",
 " StartDate":" \/Date(1519967471000)\/",
 "版本":" 15.0 SP9补丁3(2017年12月21日)",
 " QueryTemplate":" Interrupcoes/TelasPortal/RegistrarInterrupcao/Query/XQry_Interrupcoes_Sel_UI5",
 "行集":{
 "结果":[
 {
 " RowsetId":1
 " QueryTemplate":" Interrupcoes/TelasPortal/RegistrarInterrupcao/Query/XQry_Interrupcoes_Sel_UI5",
 "栏":{
 "结果":[
 {
 "名称":" IDINTERRUPCOES",
 "描述":" IDINTERRUPCOES",
 " MaxRange":1
 " MinRange":0,
 " SQLDataType":1
 " SourceColumn":" IDINTERRUPCOES"
 },
 {
 "名称":" DATAHORAINICIO",
 "描述":" DATAHORAINICIO",
 " MaxRange":1
 " MinRange":0,
 " SQLDataType":12
 " SourceColumn":" DATAHORAINICIO"
 },
 {
 "名称":" DATAHORATERMINO",
 "描述":" DATAHORATERMINO",
 " MaxRange":1
 " MinRange":0,
 " SQLDataType":12
 " SourceColumn":" DATAHORATERMINO"
 }
 ]
 },
 "行":{
 "结果":[
 {
 " IDINTERRUPCOES":" 0a489720-e861-11e6-cc45-cd370a020132",
 " DATAHORAINICIO":" 01/02/2017 06:00",
 " DATAHORATERMINO":" 01/02/2017 06:15",
 " RowId":1
 },
 {
 " IDINTERRUPCOES":" 19809df0-e861-11e6-81c0-cd370a020132",
 " DATAHORAINICIO":" 01/02/2017 06:16",
 " DATAHORATERMINO":" 01/12/2017 09:20",
 " RowId":2
 },
 {
 " IDINTERRUPCOES":" 70b75a10-e879-11e6-8be6-cd370a020132",
 " DATAHORAINICIO":" 01/02/2017 09:24",
 " DATAHORATERMINO":" 01/02/2017 11:00",
 " RowId":3
 }
 ]
 }
 }
 ]
 },
 "消息":{
 "结果":[]
 }
 }
 ]
 }
 } 
付费偷看设置
发送
3条回答
骆驼绵羊
1楼 · 2020-09-24 05:51.采纳回答
/d/results/0/Rowsets/results/0/Row/result 

尝试一下。

我是小鹏鹏啊
2楼-- · 2020-09-24 05:47

我在缓存方面遇到了问题,但是效果很好。

非常感谢您。

 items =" {
       路径:'/d/results/0/Rowset/results/0/Row/results'
 }"
 
d56caomao
3楼-- · 2020-09-24 05:50

第一个结果是一个充满对象的数组。 您需要指定所需的数组中的位置。 第二个结果也是如此。
这只会获得路径中第一个的第一个结果,第二个的第一个结果。


/d/results/0/Rowsets/results/0/Row/result

一周热门 更多>