Click here to register.
      
irc://irc.freenode.net#webgui

iPhoneGuy: WebGUI is a pile of crap.
rizen: If WebGUI is such a pile of crap, why do you use it?
iPhoneGuy: Because it's the best pile of crap out there.

If this is what people who hate us are saying, imagine what people who love us will say. Come join us on IRC.


     Discuss > WebGUI Dev

JSON 2.x to_json vs encode_json

User Graham
Date 3/27/2008 3:27 pm
Views 654
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 [
|
]
 
 
     Discuss > WebGUI Dev




Smoketest For nightly_2008-08-30 by Visitor - Sat @ 01:45am

Re: Config File Changes by pwrightson - Fri @ 04:07pm

Re: IRC Logs by koen - Fri @ 02:08pm

Re: IRC Logs by patspam - Fri @ 02:01pm

Re: IRC Logs by koen - Fri @ 01:42pm

Re: How do I find al my submitted RFE's? by bartjol - Fri @ 01:39pm

Re: IRC Logs by kristi - Fri @ 01:27pm

Re: LastModified question by perlDreamer - Fri @ 12:57pm

Re: How do I find al my submitted RFE's? by bartjol - Fri @ 12:11pm

How do I find al my submitted RFE's? by koen - Fri @ 11:23am

Re: IRC Logs by koen - Fri @ 11:20am

IRC Logs by martink - Fri @ 10:51am

Re: cleaning out the wiki by koen - Fri @ 10:44am

Re: shop in 7.5.21 by kristi - Fri @ 09:03am