Comments (6)
I would rather fix the toString() method, so that it does not add a decimal dot
to integers. I will implement that behavior that when I have time. That should
solve the problem you have.
Original comment by daniel.dreibrodt
on 19 Sep 2014 at 3:29
- Changed state: Accepted
- Added labels: Type-Enhancement
- Removed labels: Type-Defect
from plist.
That won't work for NextStep plists, because the code tries to store gigantic
numbers like 100000000000002900000044 as Doubles. This seems to be rooted in
the problem that numbers and strings look the same in NextStep plists, and the
code tries to autodetect which type you want, which isn't really possible.
In your solution, what happens if I want to store a string "10.0"? I believe
the autodetection logic will think it is a double, store it as a 10.0, and the
toString method will remove the ".0".
Original comment by [email protected]
on 19 Sep 2014 at 5:07
- Added labels: ****
- Removed labels: ****
from plist.
I realized I neglected to mention that these numbers are just too big to store
as Doubles, so the auto-detection logic loses data.
Original comment by [email protected]
on 19 Sep 2014 at 5:09
- Added labels: ****
- Removed labels: ****
from plist.
After reexamining the few documents still available about ASCII property lists
I came to the conclusion that I should remove the part from the parser that
attempts to parse numerical strings as numbers. In GnuStep there is an explicit
syntax for storing NSNumbers (<*I1234> or <*R12.34>) but other formats handle
numbers as strings. So for conformity with the existing systems the automatic
conversion of numeric strings into NSNumbers will be removed. Then such
property lists as the ones you are working with should work fine. If a user
wants to have a number from a string he can do the conversion himself, because
is a rather trivial task. What would you say?
Original comment by daniel.dreibrodt
on 22 Sep 2014 at 9:14
- Added labels: Type-Defect
- Removed labels: Type-Enhancement
from plist.
Yes, that seems much cleaner, and I'm happy with doing conversion explicitly. I
didn't realize there was a special syntax for NSNumbers, since I've been using
dd_plist almost exclusively on xcodeproj files, which I don't believe ever use
that syntax.
Thanks,
Matt
Original comment by [email protected]
on 23 Sep 2014 at 4:19
- Added labels: ****
- Removed labels: ****
from plist.
Should be fixed in r111
Original comment by daniel.dreibrodt
on 23 Sep 2014 at 6:23
- Changed state: Fixed
- Added labels: ****
- Removed labels: ****
from plist.
Related Issues (20)
- XMLPropertyListParser throws NPE on empty data node. HOT 3
- Does not retain the order of the original dictionary object HOT 2
- Set private constructor of PropertyListParser to protected to allow subclassing. HOT 1
- Enhancement : Add functions to get Java types from NSObjects HOT 3
- .pbxproj hash identified converted to boolean HOT 3
- pbxproj needs strings encoding HOT 2
- OSGi support HOT 2
- NSDictionary allows null values which cause an NPE when building pList HOT 9
- Parsing a plist with an empty key throws a NPE HOT 2
- I cannot use your library on android HOT 1
- I cannot read this plist HOT 1
- Better generic support in NSArray in order to have typed arrays of NSDictionary, NSNumber, etc HOT 2
- OutOfMemoryError when parsing a binary plist file on Android HOT 3
- java.lang.ClassCastException: android.content.res.AssetManager$AssetInputStream cannot be cast to com.dd.plist.Base64$InputStream HOT 1
- NS String doesn't encode all XML characters that require encoding HOT 2
- Should not crash when parsing file < 8 bytes HOT 3
- BinaryPropertyListParser incorrectly checking for OOM conditions HOT 1
- Nullpointer Exception while writing NSDictionary Object to plist file. HOT 2
- Not able to parse Info.plist file extracted from Hike.ipa file using r111 version, It is getting parsed in earlier versions. HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from plist.