gpt4 book ai didi

php - 这是什么格式[类似于 json]?

转载 作者:行者123 更新时间:2023-11-30 08:58:21 24 4
gpt4 key购买 nike

我想开发从通话时间 api 读取一些数据的网站。

它生成如下内容:

({"env":"production","schedulerTime":"2012-07-11 14:44:34","previous":{"name":"Written By: Jalale Ale Ahmad - Modire Madrese [www.audiolib.ir]","starts":"2012-07-11 09:30:48.228571","ends":"2012-07-11 10:01:00.087571","type":"track"},"current":{"name":"Written By: Jalale Ale Ahmad - Modire Madrese [www.audiolib.ir]","starts":"2012-07-11 10:01:00.087571","ends":"2012-07-11 10:31:11.217571","media_item_played":true,"record":0,"type":"track"},"next":{"name":"Written By: Jalale Ale Ahmad - Modire Madrese [www.audiolib.ir]","starts":"2012-07-11 10:31:11.217571","ends":"2012-07-11 11:01:17.567071","type":"track"},"currentShow":[{"start_timestamp":"2012-07-11 13:58:00","end_timestamp":"2012-07-11 16:00:00","name":"Untitled Show","id":36,"instance_id":36,"record":0,"url":"","starts":"2012-07-11 13:58:00","ends":"2012-07-11 16:00:00"}],"nextShow":[],"timezone":"IRDT","timezoneOffset":"16200","AIRTIME_API_VERSION":"1.0"})

这不是 JSON,那是什么?以及我应该如何将其转换为 php 或 javascript 数组?

最佳答案

它似乎是有效的 JSON..在 http://jsonlint.com/ 中检查它...

您可以使用 json_decode($output, true);将其转换为数组

关于php - 这是什么格式[类似于 json]?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/11430775/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com