Comments (9)
I was just curious. You're right of course. The reason for this error is that the library is heavily optimized for performance thus ignoring some edge-case lexical errors, which a json token starting with capital P is. Those produce not very meaningful errors, such as yours. I'll look into handling such errors without hitting the performance.
from json-machine.
If I get it right, do you mean when you feed JSON Machine a compressed zip file? That's usually not what you want to do in the first place, right? :)
from json-machine.
No, this is not what I want in my application but this can happen because of user input file. Of course I will verify the file type before trying to parse it, but it could be interesting to improve robustness of your library (thanks it is very usefull :) )
from json-machine.
I'm failing to reproduce the error. Can you post the data or attach a failing test with this error? Place it in ParserTest
please.
from json-machine.
Looking at it closer, the line
$tokenType = ${$token[0]};
you mention is not there since version 1.0.1
. It was removed here eeb2051. That's why I haven't been able to replicate it in 1.1.1
. The problem still persists as the Undefined array key
error though. I'll look into it.
from json-machine.
Fixed on master
. Check it out.
from json-machine.
Released in 1.1.2
from json-machine.
Thank you very much!!!
Sorry I was too busy and I didn't took time to help you for rproduction.
from json-machine.
No problem. I decided to early-release after the comment. I hope the unit test is enough. 😁 However feel free to reach out if you have any problems.
from json-machine.
Related Issues (20)
- Why only red is output HOT 4
- Iterating items from specific position HOT 1
- Document-dependent path evaluation HOT 11
- Problem With `getCurrentJsonPointer()` HOT 4
- Non-Intersecting Pointers Considered Intersecting HOT 2
- Unicode Escape Sequences Support HOT 4
- Wildcard pointer doesn't work properly HOT 4
- Re-iterate HOT 5
- Thank you for this awesome library. HOT 3
- Deprecated warning HOT 2
- Option or method for preserving the precision of numeric literals HOT 6
- CLI script for streaming HOT 8
- passing headers HOT 1
- UnexpectedEndSyntaxErrorException HOT 19
- taking time while parsing HOT 8
- Basic Usage Using PHP and Brew HOT 7
- Parsing nested values in objects HOT 4
- File parsing takes too long. HOT 6
- Unexpected symbol with Items::fromStream HOT 2
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 json-machine.