JSON based data storage in PHP