JSON ke kod PHP? Minta pencerahan dari Allah~
BIN(๑•̀ㅂ•́)و✧
BIN(๑•̀ㅂ•́)و✧ 2023-02-28 11:55:29
0
4
620

JSON adalah seperti berikut:

{
    "pageList":{
        "pageCount":1,
        "curPage":1,
        "rowsCount":1,
        "colList":[
            {
                "colEnName":"id"
            },
            {
                "showName":"true",
                "colZhName":"供应商名称",
                "widgetType":"textWidget",
                "colEnName":"gysmc"
            },
            {
                "colZhName":"备注",
                "widgetType":"textAreaWidget",
                "colEnName":"bz"
            },
            {
                "colZhName":"金额",
                "widgetType":"moneyWidget",
                "colEnName":"money"
            },
            {
                "colZhName":"总人数",
                "widgetType":"numberWidget",
                "colEnName":"number"
            },
            {
                "colZhName":"入住日期",
                "dateFormat":"yyyy-MM-dd",
                "widgetType":"dateWidget",
                "colEnName":"rzrq"
            },
            {
                "colZhName":"入住具体时间",
                "dateFormat":"yyyy-MM-dd HH:mm",
                "widgetType":"dateWidget",
                "colEnName":"rzjtsj"
            },
            {
                "colZhName":"入住年月",
                "dateFormat":"yyyy-MM",
                "widgetType":"dateWidget",
                "colEnName":"rzny"
            }
        ],
        "dataList":[
            {
                "number":"2100000",
                "rzrq":"2017-11-17",
                "gysmc":"供应商名称",
                "money":"549771.0",
                "rzny":"2017-11",
                "bz":"备注信息10",
                "rzjtsj":"2017-11-17 08:00",
                "id":"10"
            }
        ]
    },
    "error":null,
    "errorCode":0,
    "success":true
}


Maafkan saya, tuan, adakah anda ingin menggunakan PHP untuk mengeluarkan JSON ini. Bagaimana cara menulisnya?

BIN(๑•̀ㅂ•́)و✧
BIN(๑•̀ㅂ•́)و✧

membalas semua(3)
靠近你深拥你

cuba ini echo json_encode($result,JSON_UNESCAPED_UNICODE);

失忆孤独患者

Bahagian ini ialah data json

大瓶可乐@php.cn

Apakah maksud output? Adakah ia mengeluarkan data dalam json?

Ya json_decode

Muat turun terkini
Lagi>
kesan web
Kod sumber laman web
Bahan laman web
Templat hujung hadapan