R
R
resident2015-09-04 21:29:07
PHP
resident, 2015-09-04 21:29:07

How to parse large JSON in PHP?

Good day friends! There is a 160Mb JSON file, you need to parse it, preferably using php. json_decode runs into memory limits, although it costs memory_limit = -1. What are the alternative options?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
A
Andrey Nikiforov, 2015-09-04
@eoffsock

Technologically, this is solved in two ways.
For the second option see https://github.com/salsify/jsonstreamingparser

A
Andrey Kobyshev, 2015-09-04
@yokotoka

How often do these files need to be parsed? Maybe you should take another tool, not php?

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question