开发者

PHP - Convert JSON to Plist?

How w开发者_运维技巧ould one use PHP (and whatever necessary libraries) to convert JSON data to Plist data?


I would decode the data and then encode it using CFPropertyList

Simply:

$plist = new CFPropertyList();    
$td = new CFTypeDetector();  
$guessedStructure = $td->toCFType( json_decode($json) );
$plist->add( $guessedStructure );
$xml = $plist->toXML();


Transfer it into an array first. After that, do whatever you want with that

json_decode($json);
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜