Import the plist_t structure from memory data.
This function will look at the first bytes of plist_data to determine if plist_data contains a binary, JSON, OpenStep, or XML plist and tries to parse the data in the appropriate format.
- Note
- This is just a convenience function and the format detection is very basic. It checks with plist_is_binary() if the data supposedly contains binary plist data, if not it checks if the first bytes have either '{' or '[' and assumes JSON format, and XML tags will result in parsing as XML, otherwise it will try to parse as OpenStep.
- Parameters
-
| plist_data | A pointer to the memory buffer containing plist data. |
| length | Length of the buffer to read. |
| plist | A pointer to the imported plist. |
| format | If non-NULL, the plist_format_t value pointed to will be set to the parsed format. |
- Returns
- PLIST_ERR_SUCCESS on success or a plist_err_t on failure