Decode JSON files in PHP without json_decode

Asked

Viewed 45 times

1

I am currently returning JSON data from queries via Elasticsearch, however, the returns have a lot of information and the use of json_decode to be able to manipulate this data becomes very costly for the server.

For example, the server memory usage is in 5MB when returning the pure ES JSON, but when using json_decode the memory usage goes to 300MB, and the problem only increases as the amount of data.

Is there any alternative that doesn’t consume as much server memory and brings JSON in exactly the same way it is written in the original JSON string?

  • tries to divide, and remove the neediness

No answers

Browser other questions tagged

You are not signed in. Login or sign up in order to post.