如何在iOS中反序列化php字符串


how to deserialize php string in iOS

这是我从php中维护的数据库中获得的一个字符串示例。我不确定如何在我的iPhone中使用它来提取各种值:

a:27:{s:26:"the-muse_disable_post_meta";s:5:"false";s:31:"the- muse_disable_published_date";s:4:"true";s:23:"the-muse_disable_author";s:5:"false";s:24:"the-muse_disable_coments";s:5:"false";s:19:"the-muse_page_title";s:13:"default_title";s:21:"the-muse_custom_title";s:0:"";

将响应更改为JSON数组,您可以简单地用每种编码语言解析它。

PHP

    echo json_encode($array);