Is there a way to query JSON in PHP?

class, filesystems, json, php

Solution

You can use JsonQ package. This package can query over JSON data like Query Builder.

https://github.com/nahid/jsonq

Problem

I've used Google, Yahoo, AND Bing, but I can't find any good answers. I've seen jLinq, but I want to be able to query JSON in PHP in hopes of having a not an SQL database, but instead all data storage within the filesystem on my server. No, I don't care how bad it sounds. Ideas nonetheless? I would think that there would be a PHP class on this. -----EDIT----- Guys, thanks for your answers so far, but I don't think that json_encode and json_decode are of much use. What I want to be able to do is encode/decode JSON, and be able to search it for specific keys with specific values. Albeit I have PROVEN to myself that I can do so, it's a lot of code for something that should be so simple. Anything else you have in mind?

Original source