Jquery jqGrid未显示JSON数据

Jquery jqGrid未显示JSON数据,jquery,json,jqgrid,Jquery,Json,Jqgrid,我使用jqGrid来显示一些json数据,但是当我运行代码时,网格没有显示任何内容,并且在控制台中没有收到任何错误消息。 以下是我的js代码: $("#gridWall").jqGrid({ datatype: 'json', data: data, colNames: ['Id', 'Title', 'Artist', 'ISRC'], colModel: [ {name: 'Id', index: 'music_video_id'

我使用jqGrid来显示一些json数据,但是当我运行代码时,网格没有显示任何内容,并且在控制台中没有收到任何错误消息。 以下是我的js代码:

$("#gridWall").jqGrid({
    datatype: 'json',
    data: data,
    colNames: ['Id', 'Title', 'Artist', 'ISRC'],
    colModel: [
               {name: 'Id', index: 'music_video_id', width: 100, editable: false},
               {name: 'Title', index: 'title', width: 150, editable: false},
               {name: 'Artist', index: 'artist_name', width: 200, editable: false},
               {name: 'ISRC', index: 'isrc', width: 150, editable: false}

    ],
    pager: '#gridpagerWall',
    loadonce: true,
    rowNum: 100,
    rowList: [100, 200, 300],
    sortname: 'title',
    sortorder: 'asc',
    jsonReader: {
        repeatitems: true,
        root: "contents",
        page: '1',
        total: "number"

    },
    viewrecords: true,
    gridview: true,
    hidegrid: false,
    caption: 'Wall builder',
    editUrl: 'clientArray',
   })
我的JSON数据如下所示:

{"number":50,"type":5,"contents":[{"title":"xxx","isrc":"xxx","artist_name":"xx","music_video_id":"1"},...]}
有人知道我如何解决我的问题吗?
谢谢

使用检查您的json是否有效。 然后将data:data更改为url:data 我希望变量数据包含有效的url