Helper versus PHP code

Permalink 2 users found helpful
How is using the C5 JSON helper encode function different than PHP's built-in json_encode() function?

 
JohntheFish replied on at Permalink Best Answer Reply
JohntheFish
It provides a portability layer for situations where php does not have the built in function. Using it is a requirement of anything getting through the prb.

The main negative is that it only converts json to objects and not to arrays, so if working with arrays you then need to do an object to array conversion.

There is a change in github for the next c5 version that add this missing option.
JohntheFish replied on at Permalink Reply
JohntheFish
EDIT, I thought this had made it into 5.6.1, but have been corrected. the pull request remains open.

On earlier versions of c5, you can convert json -> php object-> php array as per this howto:
http://www.concrete5.org/documentation/how-tos/developers/convertin...
rainmaker replied on at Permalink Reply
rainmaker
Hey JohntheFish!

You're awesome...as usual. :) Thanks for the little "How to".