Closed ReagentX closed 1 year ago
There are a couple of things here.
It looks like Value
is missing Value::from_bytes
to mirror plist::from_bytes
. That should be implemented. There should also be a doc example of what to do if you have an XML plist string.
The From
impl for str
is working as intended, although clearly its semantics aren't great. However, it couldn't be used to construct a plist from an XML plst string, as From
impls are infallible.
As for why it exists, those conversions are pretty much copied from serde_json
which is the crate people are most likely familiar with.
I'm going to close this as working as intended.
Thanks for all your work on this library, it was invaluable for my work on imessage-exporter
!
Sample code:
Output:
Opening the same plist as a file (using
Value::from_reader
) works as expected.