Comments (4)
This is not easily done.
The used java.xml parser does not provide line number information. One would need to implement a custom SAX handler that tracks location information. Or maybe use a third party library.
The ASCII property list parser is only parser where location information is available. But only the offset within the file, not the line or column number.
For binary property lists the offset within the file is available, but that information is hardly useful.
from dd-plist.
Still it makes sense to have good information what to look at in case of error.
In binary files row and column would not make sense, I agree. But having a location path and a byte offset would be the best that can be offered and therefore should.
For ASCII and XML there is definitely a way to markup location path and row/column information.
The parser generator ANTLR is able to produce really good parsing errors, however I am unsure about the grammar for plist files. Hence I came to this project, which has a stunning parser but bad error information.
from dd-plist.
@HiranChaudhuri Please take a look at this pull request #95 and check if that addresses your concerns.
from dd-plist.
All requested features should be taken care of by the merged PR #95 .
from dd-plist.
Related Issues (20)
- PropertyListParser.determineType can only detect UTF-8 BOM HOT 3
- ASCIIPropertyListParser fails to read file that contains only comment
- add support for NSKeyedArchiver
- OutOfMemoryError parsing a small plist file HOT 4
- Various undeclared exceptions with fuzzed input HOT 2
- Various undeclared exceptions with fuzzed input - Part 2 HOT 2
- Cyclic references in binary property list cause StackOverflowError HOT 1
- Parsing of ASCII and XML property lists can cause IllegalArgumentException
- Illegal property list content should not cause exceptions other than PropertyListFormatException HOT 1
- NSDictionary with NULL as key value cause NullReferenceException in BinaryPropertyListParser HOT 1
- Adding NULL to an NSSet causes a NullReferenceException
- Adding a UID to a NSSet causes a ClassCastException
- NSArray to typed array with polymorphism HOT 2
- Binary property list parser does not check object offsets and lengths correctly
- NSNumber parser fails for "+infinity" and "-infinity" HOT 1
- Add support for Java Platform Module System (JPMS) HOT 1
- How to make PList 'date' format key start with uppercase HOT 1
- ParseException errorOffset from ASCIIPropertyListParser::parseQuotedString is offset by the length of the quoted string HOT 1
- Add parent relationship to NSObject HOT 1
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 dd-plist.