Closed cmyr closed 1 year ago
I don't object to these functions. I think they should line wrap when writing though - this is the function to use.
Interesting... that function piqued my curiousity, so I went and used Xcode to write some plist files and I don't see the wrapping behaviour that is described there. Did you derive it yourself, or was there some other source?
In general the writing side of this code is sort of funny. I don't expect it to be used in the context of actually writing out a plist, for which serialize
makes more sense. At best I could see it as a convenience method for writing tests; I included it for completeness.
In any case I'm now using that function, with an 'indent' value of 0.
This mirrors the similar methods on the
Date
type.I'm in a funny situation where I need to construct a plist that is embedded in another XML document; I'm doing this by writing custom derive impls for the various Value types, and having these methods live here saves me from needing to manage the base64 dependency myself.
No sweat if this feels overly specific, I have other options this is just the simplest for me.