-
Notifications
You must be signed in to change notification settings - Fork 123
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
Parsing a null-string and re-building that file results in incorrect structure #79
Comments
👍 Just ran into the same problem:
... results in:
|
@akofman's changes sort the problem for me. |
Can confirm, @akofman's fix worked for me on OS Sierra with Xcode 8.0 |
Issue is still there in my environment:
to
xcode 8.1 |
Still a problem |
Hey sorry for the super long reply delay. Can we get a PR for this? I'm happy to review/merge. Would be nice to get this in for the upcoming v4 release. |
It has indeed been a while ;) I just reread the comments and unless I'm mistaken this was fixed in #84. We are not using this package anymore and I'm not able to verify just now, but I think this issue van be closed. |
i have changed jobs 3 times since i subscribed to this issue so I can't verify either |
When parsing a file containing an empty string and re-building that JSON to a plist, the empty string will not be added, resulting in a key without a value (see example below). The fix might be simple on the 'parse' side, as there is an explicit null-check on parse.js@131:
if(isEmptyNode(node)) return null;
. This can be changed toif(isEmptyNode(node)) return '';
as empty strings behave correctly.However, this probably means null-values in JSON generated from other sources are affected as well, so perhaps this needs a fix on the build-side as well.
Example code:
Output:
The text was updated successfully, but these errors were encountered: