Code Monkey home page Code Monkey logo

jsonparser's People

Contributors

kuma-giyomu avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

jsonparser's Issues

Error while parsing

Hi, I get the following error while parsing a json feed:

Fatal error: Uncaught exception 'Exception' with message 'Lexical Error: Unmatched Input.' in package\JSONLex.php on line 3475

test-feed json

I've uploaded the json feed file. Had to rename it to "png". You should remove ".png" file extension to get the json file.

Best regards,
Daniel

Convert to Object

Hi, sorry before, I ask in here.
I successfully run your test code. But now how I can arrange every property and value into one object?
For example:
$activities = json_decode(file_get_contents($basePath . 'Activity.json'));

$activities will become object so I just call $activities->results or $activity->id.

how to use json_decode with your example

Your file dumps all the json file, how can i use json_decode to decode data to php array.

i know its not possible to decode whole big json file at once, this is why i am trying your library.

may be using loop to do use json_decode one by one json object and apply my programmings logics in loop to update or insert data in database.

but how to use loop and do json_decode if i can not save the parsed json object to php variable.??

How to have the php array ?

Hello,

I would try your parser but i don't understand one thing.

After parserDocument(), how to give the final php array ?

Thanks

query for test file

whats the $value and $property variable represent in the test file. and can i use this code directly in my controller for working?

Does not work in PHP 5.6?

Hi.

We're using this parser - it's great - but we ran into an issue on environments with PHP 5.6 installed - we got this error:

Undefined offset: 65536
exception 'ErrorException' with message 'Undefined offset: 65536' in /Users/nino/Documents/gitdev/spire/dcon56/digital-consulting/app/helpers/JSONParser/JSONLex.php:3486
Stack trace:
#0 /Users/nino/Documents/gitdev/spire/dcon56/digital-consulting/app/helpers/JSONParser/JSONLex.php(3486): Illuminate\Exception\Handler->handleError(8, 'Undefined offse...', '/Users/nino/Doc...', 3486, Array)

(with more stack trace steps below, but I don't think they're as useful).

I noticed that 65536 is eight times the 8192 character chunk that you're reading in - I'm not sure what's going on with that.

However, it works fine in PHP 5.4, so that's fine for us.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.