Click here to register.
      
YAPC North America 2008


     JSON 2.x to_json vs encode_json > Re: JSON 2.x to_json vs encode_json

JSON 2.x to_json vs encode_json

User Graham
Date 3/27/2008 3:27 pm
Views 315
Rating 0    Rate [
|
]
Previous · Next
User Message
Graham
We've been using to_json everywhere to do JSON encoding, but in any place where you may be storing UTF-8 data, you should use encode_json and decode_json instead.  This was a problem for the poll, and is likely an issue elsewhere as well.

Back to Top
Rate [
|
]
 
 
colink

is it as simple as

s/(from|to)(?=_json)/$1 eq 'from' ? 'decode' : 'encode'/esg; 



Back to Top
Rate [
|
]
 
 
Graham
Should be pretty much that simple.  I can't think of anywhere offhand where we would not want to use UTF8.
On Mar 27, 2008, at 4:02 PM, <ckuskie@sterlink.net> <ckuskie@sterlink.net> wrote:
colink wrote:

is it as simple as

s/(from|to)(?=_json)/$1 eq 'from' ? 'decode' : 'encode'/esg; 



http://www.plainblack.com/webgui/dev/discuss/json-2_x-to_json-vs-encode_json/1

--

Plain Black&#44; makers of WebGUI
http://plainblack.com



Back to Top
Rate [
|
]
 
 

Extending TinyMCE by philadev - Fri @ 11:31am

Re: Bilingualism by Klaus - Fri @ 07:34am

Re: Bilingualism by bepo - Fri @ 06:00am

Smoketest For nightly_2008-05-16 by Visitor - Fri @ 12:52am

C2: JSON collateral rewrite by colink - Fri @ 12:00am

Smoke Test for SVN (2008-05-16) by botaction - Thu @ 11:48pm

Recommendation for web chat system? by bernd - Thu @ 02:27pm

Re: InnoDB in WRE by BNC - Thu @ 09:56am

Re: Bilingualism by fathertorque - Thu @ 05:58am

Smoketest For nightly_2008-05-15 by Visitor - Thu @ 12:51am

Smoke Test for SVN (2008-05-15) by botaction - Wed @ 11:48pm

Re: The debian openssl/openssh bug by patspam - Wed @ 08:50pm

The debian openssl/openssh bug by patspam - Wed @ 07:00pm

Re: Bilingualism by Klaus - Wed @ 01:29pm