My favorites | Sign in
Project Home
READ-ONLY: This project has been archived. For more information see this post.
Search
for
  Advanced search   Search tips   Subscriptions
Issue 68: touchJSON: (1, 1) serializes into [11]
1 person starred this issue and may be notified of changes. Back to list
Status:  Invalid
Owner:  ----
Closed:  Dec 2009


 
Reported by kismetww...@kismetworldwide.com, Dec 8, 2009
What steps will reproduce the problem?
1.  try to serialize an array with two elements, each an [NSNumber  numberWithInt:1]
2. get bad results.

What is the expected output? What do you see instead?

Expected:  [1, 1]
GOT: [11]


What version of the product are you using? On what operating system?
latest (1.0.6), on MacOSX building for the iPhone

Please provide any additional information below.

I asked people on #iphonedev on freenode to confirm, and they did.  Here was their anonymized 
responses:


This. if (theValue != [inArray lastObject]) [theString appendString:@","];

That's friggin stupid.

It doesn't take into account the fact that arrays might have the same object in them twice

Better way: keep track of the index, and compare the index to the array length 

Dec 15, 2009
Project Member #1 jwight
This was fixed a while ago. I suggest you make sure you're running the latest code from version control before 
accusing anything of being "frigging stupid".
Status: Invalid
Dec 15, 2009
Project Member #2 jwight
Oh and see https://code.google.com/p/touchcode/issues/detail?id=52 for more information.
Dec 15, 2009
#3 kismetww...@kismetworldwide.com
I was using 1.0.6, which was the latest in "downloads" when I submitted the bug, and
the people on IRC downloaded it and tested it from the same place, I believe 1.0.6
(but did not see them actually test it), so I'm not sure this was fixed in 1.0.6.  I
noticed there's now a 1.0.7 that got submitted 40 minutes ago, if I've got time I'll
check the code, but since the bug I switched to json-framework and that seems to be
working better.

If people should be running the latest code from SVN, not the "downloads" .zip's,
maybe you could make that clearer on the "downloads" page, as I assumed SVN was
in-dev and not fully tested, and the builds in "downloads" were the tested releases.

And I wasn't accusing anyone of anything, I just quick copied and pasted the IRC
responses because it had the location of the code.  I should've removed the "friggin
stupid" line, my apologies for the unintended insult.

Thanks for the reply.

Dec 15, 2009
#4 kismetww...@kismetworldwide.com
I just tested with the 1.0.7 .zip uploaded 81 minutes ago and this seems to be fixed
in 1.0.7.  Thanks.


Powered by Google Project Hosting