[json-lib-user] Strings with square brackets being interpreted as arrays
Brought to you by:
aalmiray
From: Pedro P. <ped...@we...> - 2010-05-31 17:17:56
|
Hello all, I'm having an issue with json-lib 2.2.3 and 2.3, where strings that contain exactly a json-style array are interpreted as arrays rather than strings ("key":"[1,2,3]" are being interpreted as if the source read "key": [1,2,3]). A space at the end of the string seems to short- circuit this behaviour (i.e. "key":"[1,2,3]" is misinterpreted, but "key":"[1,2,3] " isn't). This seems to be consistent (and I find the same behaviour) with what Pedro Alves posted about a year ago in this mailling list, where the same happens with strings shaped like "function(){}". Is this supposed to be a feature I'm unaware of, or is this simply a bizarre bug? Thanks for your attention. Regards, Pedro Pinheiro |