Loading the entire JSON object into memory isn't a good idea. Instead, I would use the file handle to search each line for the records needed. Each line in the file could be a JSON object.
In all truth though, I can't imagine any use for this instead of SQLite. SQLite is the most used database in the world and comes built into PHP. It's tiny, requires no installation, and has the full power of SQL behind it.
Loading the entire JSON object into memory isn't a good idea. Instead, I would use the file handle to search each line for the records needed. Each line in the file could be a JSON object.
In all truth though, I can't imagine any use for this instead of SQLite. SQLite is the most used database in the world and comes built into PHP. It's tiny, requires no installation, and has the full power of SQL behind it.