SunnysideUp\ShareThis\Services_JSON::encode
encodes an arbitrary variable into JSON format
Signature
public function encode(mixed
$var )
Parameters
$var
— mixed- any number, boolean, string, array, or object to be encoded.
see argument 1 to Services_JSON() above for array-parsing behavior.
if var is a strng, note that encode() always expects it
to be in ASCII or UTF-8 format!
Returns
- mixed
- JSON string representation of input var or an error if a problem occurs