From: shahrzad khorrami on 10 May 2010 09:37 hi dears, I have a json file. I want to access some fileds of this json file only and can add some fields to it also... I couldn't find any thing in www, json api ! is there any function to get specific data from json file or add function that can add something in somewhere in this json file or create new json file from this file with my format? Thanks alot, Shahrzad Khorrami
From: Nathan Rixham on 11 May 2010 05:02 shahrzad khorrami wrote: > hi dears, > > I have a json file. I want to access some fileds of this json file only and > can add some fields to it also... > I couldn't find any thing in www, json api ! is there any function to get > specific data from json file or add function that can add something in > somewhere in this json file or create new json file from this file with my > format? $json = // get your json and pop it in this var $data = json_decode( $json ); // work on data as php arrays/objects etc $json = json_encode( $data ); // save the json back to a file or output or..
From: shahrzad khorrami on 11 May 2010 05:05 thanks Nathan, I think this is a good way
|
Pages: 1 Prev: __call and recursion Next: How to get input from socket client |