Components | All | New | MacOS | Windows | Linux | iOS | ||||
Examples | Mac & Win | Server | Client | Guides | Statistic | FMM | Blog | Deprecated | Old |
PList.WriteData
Encodes property list data.
Component | Version | macOS | Windows | Linux | Server | iOS SDK |
PList | 11.4 | ✅ Yes | ❌ No | ❌ No | ✅ Yes, on macOS | ✅ Yes |
MBS( "PList.WriteData"; JSON ) More
Parameters
Parameter | Description | Example |
---|---|---|
JSON | The data with the JSON data as input. |
Result
Returns text or error.
Description
Encodes property list data.Takes JSON and produces matching property list in XML format.
You can write this into a plist file with Text.WriteTextFile in UTF-8 encoding.
You can use PList.ReadData to convert back from plist to JSON.
Examples
Convert JSON to Plist:
MBS( "PList.WriteData"; "{\"id\":1234}" )
Example result:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>id</key>
<integer>1234</integer>
</dict>
</plist>
See also
Blog Entries
This function checks for a license.
Created 29th August 2021, last changed 29th August 2021