Skip to main content

Module plist

Module plist 

Source
Expand description

Helpers for reading message property-list payloads.

The main entry point is parse_ns_keyed_archiver(). For normal property lists, use plist_as_dictionary().

§Overview

The NSKeyedArchiver format is a property list-based serialization protocol used by Apple’s Foundation framework. It stores object graphs in a keyed format, allowing for more flexible deserialization and better handling of object references compared to the older typedstream format.

§Origin

Introduced in Mac OS X 10.2 as part of the Foundation framework, NSKeyedArchiver replaced NSArchiver (typedstream) system as Apple’s primary object serialization mechanism.

§Features

  • Pure Rust implementation for efficient and safe deserialization
  • Support for both XML and binary property list formats
  • No dependencies on Apple frameworks
  • Robust error handling for malformed or invalid archives

Functions§

extract_array_key
Extract an array from a collection key.
extract_bytes_key
Extract bytes from a collection key.
extract_dict_idx
Extract a dictionary from a collection index.
extract_dictionary
Extract a dictionary from a collection key.
extract_int_key
Extract a real value from a collection key and coerce it to i64.
extract_string_key
Extract a string slice from a collection key.
get_bool_from_dict
Extract a boolean from {key: true}.
get_data_from_dict
Extract a byte slice from {key: Data(...)}.
get_float_from_nested_dict
Extract a float from {key: {key: 1.2}}.
get_owned_string_from_dict
Extract an owned non-empty string from {key: String("value")}.
get_string_from_dict
Extract a non-empty string from {key: String("value")}.
get_string_from_nested_dict
Extract a non-empty string from {key: {key: String("value")}}.
get_value_from_dict
Extract a value from {key: value}.
parse_ns_keyed_archiver
Deserialize an NSKeyedArchiver property list by resolving UID references.
plist_as_dictionary
Extract a dictionary from table plist data.
rich_link_metadata_and_nested
Extract the shared richLinkMetadata payload and one nested metadata value.