Plist Date and Data (Base64) Types in JSON
Learn how plist date elements and Base64-encoded data elements are represented in JSON, and how the converter handles these special types.
Detailed Explanation
Special Plist Types: Date and Data
Plist XML has two types that do not have direct JSON equivalents: <date> for ISO 8601 timestamps and <data> for Base64-encoded binary content.
Plist Example
<dict>
<key>CreatedAt</key>
<date>2025-06-15T14:30:00Z</date>
<key>ModifiedAt</key>
<date>2025-12-01T09:00:00Z</date>
<key>IconData</key>
<data>
iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJ
AAAADUlEQVR42mNk+M9QDwADhgGAWjR9awAAAABJRU5E
rkJggg==
</data>
</dict>
JSON Output
{
"CreatedAt": "2025-06-15T14:30:00Z",
"ModifiedAt": "2025-12-01T09:00:00Z",
"IconData": "iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAADUlEQVR42mNk+M9QDwADhgGAWjR9awAAAABJRU5ErkJggg=="
}
How Dates Are Handled
In plist-to-JSON, <date> values become ISO 8601 strings. In JSON-to-plist, the converter detects strings matching the ISO 8601 pattern (YYYY-MM-DDTHH:MM:SS) and wraps them in <date> tags automatically. Non-ISO date strings remain as <string>.
How Data Is Handled
<data> contains Base64-encoded binary. In JSON, this becomes a plain string. The reverse conversion does not auto-detect Base64 content because many regular strings happen to be valid Base64. If you need <data> in the output, you may need to manually adjust the result.
Use Case
Critical when working with plist files that contain creation timestamps, modification dates, or embedded binary resources like icons and certificates. Common in macOS bundle resources and provisioning profiles.