-
Notifications
You must be signed in to change notification settings - Fork 99
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
add flag to flatten a single-value array #21
Comments
That's a cool feature. 👍!
I do, however, have to ask: Will launchd be upset if it gets a
single-element array?
|
A great question, and one I intend to test shortly. If it does, that's your use-case right there. If not, this could still be useful, but could also be backlogged. |
@alaska Did you ever test how launchd reacts to single-element arrays? I'm looking at working on plist package improvements, and I'd like to prioritize my open issues. 😄 |
I haven't had the time to dig into this. I'll try and break some time off this weekend. |
The changes in 221fc98 should address this. I added an example (well, a test case) for an array that is serialized as a single object or an array depending on how long it is. |
That example is here. |
I'm currently using this library to create plists for launchd. In a couple of locations, the specification says
<dictionary [of something] or array of dictionaries [of the same thing]>
. I can't imagine launchd is the only place to do this. It would be nice to be able to have a flagflattensingle
such that, givenThe output would be
Rather than what it is now:
The text was updated successfully, but these errors were encountered: