Click here to register.
      
Sprechen Sie WebGUI? Parlez vous WebGUI? Se habla WebGUI? Spreekt u WebGUI?

Do you speak WebGUI? Please help us translate WebGUI into your language.



     WebGUI Dev > 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 795
Rating -1    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 [
|
]
 
 

Error in log. by pvanthony - Fri @ 12:46pm

Re: Goals by JT - Fri @ 12:31pm

Re: Images in RSS-Syndicated asset by elnino - Fri @ 12:25pm

Re: Password Recovery info wrong by dwittenberg - Fri @ 12:04pm

Re: Password Recovery info wrong by dwittenberg - Fri @ 12:03pm

Re: WebGUI::Crypt by JT - Fri @ 11:56am

Re: Images in RSS-Syndicated asset by ehab - Fri @ 11:52am

Re: Images in RSS-Syndicated asset by elnino - Fri @ 11:47am

Re: Password Recovery info wrong by knowmad - Fri @ 11:18am

Re: Password Recovery info wrong by dwittenberg - Fri @ 11:11am

Re: Password Recovery info wrong by bartjol - Fri @ 10:56am

Password Recovery info wrong by dwittenberg - Fri @ 10:22am

Re: Conventions for German translation by bartjol - Fri @ 07:24am

Smoketest For nightly_2008-10-10 by Visitor - Fri @ 01:55am