PDA

View Full Version : JSBuilder2 adds a semi colon to the end of the compressed file



brookd
18 Nov 2009, 5:45 PM
While not usually an issue, if your compressing a json config file, something like:



{
yourmama:'isFat',
response:'HowFatisShe?'
}


from the server and your compressing it with JSBuilder it adds a ";" to the end of the json which results in ''missing ) in parenthetical" if you try to load it and then decode it. This works as a workaround:



Ext.decode(
(a.charAt(a.length-1)==';')?(a.slice(0, -1)):a
)