Home >Backend Development >PHP Tutorial >想知道下这是什么格式的json?怎么解析啊?

想知道下这是什么格式的json?怎么解析啊?

WBOY
WBOYOriginal
2016-06-23 13:02:40933browse

s:2287:"a:5:{s:6:"_token";s:40:"ZTmx28Gu0KoOMEblFuwWAAXu0zRE6vbM6i95HKUG";s:9:"_previous";a:1:{s:3:"url";s:81:


跪求这是什么格式的数据啊,这种数据在PHP中如何解析成json或是数组啊?拜托了在线等


回复讨论(解决方案)

这是 php 的序列化(serialize)数据
$d = unserialize('你的那个字符串'); //就还原成数组了
echo json_encode($d); //就输出成 json 了

这是 php 的序列化(serialize)数据
$d = unserialize('你的那个字符串'); //就还原成数组了
echo json_encode($d); //就输出成 json 了




谢谢大哥 搞懂了,弄好了 刚才测试了几次 后面才发现他serialize了两次 我unserialize两次然后就可以了谢谢了版主
Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn