-
Notifications
You must be signed in to change notification settings - Fork 16
Working with Pimf_Util_Json
g.krsteski edited this page Jun 3, 2014
·
1 revision
In PHP we have some nifty functions named json_encode() and json_decode() and PIMF makes great use of these. Why? Because JSON is very easy to read and convenient for storing arrays and objects with values as strings.
Encode
$json = \Pimf\Util\Json::encode($item);
Decode
$item = \Pimf\Util\Json::decode($json);
You can use any of the following data types in your JSON:
- Double
- Float
- String
- Boolean
- Array
- Object
- Null