Open GoogleCodeExporter opened 8 years ago
You right, I will take care of it, unless you already have fixed it and can
provide me patch or your version of the code?
Original comment by wach.piotrek
on 4 Aug 2010 at 2:50
I might have some code I can give you. I didn't examine the JSON standard in
detail to see which characters should be supported. One would think that \r and
\n could simply be skipped in the inital parsing, but I know that some JSON for
my application had \n embedded in certain string objects. I'm fairly certain
they were properly escaped, though.
Overall, shouldn't these 2 characters just be ignored (since they could be in
the JSON for pretty formatting)?
Original comment by gregn...@gmail.com
on 4 Aug 2010 at 6:57
Yes, you are right, these 2 characters should be ignored if they are not
properly escaped because they may have been used for pretty formatting as you
said.
Original comment by wach.piotrek
on 5 Aug 2010 at 9:18
My fix is to comment(or remove) \n \r from switch in JsonTokener.cpp :
...
for (;;)
{
c = Next();
switch (c)
{
case 0:
// case '\n':
// case '\r':
User::Leave(KErrNotSupported);
...
BTW, this method is only used in CJsonParser::ParseL, where it finds closing "
and returns enclosing string.
Regards,
Macvek
Original comment by Mac...@gmail.com
on 27 Aug 2010 at 4:07
Original issue reported on code.google.com by
a.shaf3...@gmail.com
on 9 Jun 2010 at 4:13