Quote:
Originally Posted by t3hl33td4rg0n
You're referring to?
Code:
json_encode($array);
Just looked it up, this is gonna make things much easier! For the past few days I've procrastinating and loathing how everything was going to be compiled and parsed back and forth lol!
|
Yep. That PHP function will encode any array or objects into a JSON string. There was also a php version of the json_encode functions for use in servers which don't have the newest version of PHP installed, but it was far far slower than the C extension. Remember though, that the JSON encoding will only encode data, not functions. Functions do not get encoded back into Javascript object functions.
Also, json_encode will only encode public object variables. Any object variable that is not public will be left out of the encoding.