librelist archives

« back to archive

Handling escaped characters in json data

Handling escaped characters in json data

From:
Hiran Ramankutty
Date:
2011-11-11 @ 16:32
Hi,

I am facing problem with parsing json data with escape characters. My
sample json text is:

{ "name" : "\328Hiran" }

How can I overcome this problem?

--
Hiran

Re: [yajl] Handling escaped characters in json data

From:
Abhishek Jain
Date:
2011-11-12 @ 16:21
As far as I know, this is invalid escape sequence. You can escape control
characters (< 32 ASCII values) or send unicodes as an escape sequece (of
the form \uhhhh) where 'h' is hex character. The sample does not fall in
either of the two category. Is this want you intended??

_abhi
On Fri, Nov 11, 2011 at 10:02 PM, Hiran Ramankutty <hiran.rk@gmail.com>wrote:

> Hi,
>
> I am facing problem with parsing json data with escape characters. My
> sample json text is:
>
> { "name" : "\328Hiran" }
>
> How can I overcome this problem?
>
> --
> Hiran
>

Re: [yajl] Handling escaped characters in json data

From:
Hiran Ramankutty
Date:
2011-11-12 @ 17:28
Thanks Abhishek.

Right now, I am validating chars with < 32 ASCII values and removing
the ones which do not fit.

--
Hiran

On Sat, Nov 12, 2011 at 9:51 PM, Abhishek Jain <abhins4@gmail.com> wrote:
>
> As far as I know, this is invalid escape sequence. You can escape control
> characters (< 32 ASCII values) or send unicodes as an escape sequece (of the
> form \uhhhh) where 'h' is hex character. The sample does not fall in either
> of the two category. Is this want you intended??
>
> _abhi
> On Fri, Nov 11, 2011 at 10:02 PM, Hiran Ramankutty <hiran.rk@gmail.com>
> wrote:
>>
>> Hi,
>>
>> I am facing problem with parsing json data with escape characters. My
>> sample json text is:
>>
>> { "name" : "\328Hiran" }
>>
>> How can I overcome this problem?
>>
>> --
>> Hiran
>
>