If you can store the offending JSON and then run it through a JSON verifier
to see if it's malformed, that'd be great. Please post the offending JSON
and the error.

Otherwise, if there is a case where disambiguation is impossible, please
give examples of the two messages types that cannot be categorized.

Chances are that there is a new field in the message that your logic isn't
handling correctly. I'm not aware of any payload of rendering changes
recently.

-John Kalucki
http://twitter.com/jkalucki
Infrastructure, Twitter Inc.



On Sun, Apr 18, 2010 at 2:29 AM, Carl Knott <carl.kn...@gmail.com> wrote:

> I have developed an iPhone app that connects to the streaming API.... the
> app was running correctly for 2 months but since yesterday it has not! I can
> still receive a response from the stream but now I can not parse the JSON
> correctly... My parser believes that the stream is incorrectly structured. I
> get a few correctly structured results and then I get errors. Is it a
> problem at twitters end or mine? Below is a snippet of my code.
>
> To initialize the HTTP request:
>
> request = [NSURLRequest requestWithURL:[NSURL URLWithString:[NSString
> stringWithFormat: @"http://%@:%@@
> stream.twitter.com/1/statuses/filter.json?track=%@", [[NSUserDefaults
> standardUserDefaults] stringForKey:@"UsernameKey"], [[NSUserDefaults
> standardUserDefaults] stringForKey:@"PasswordKey"], searchFormat]] ];
>
>
> - (void)connection:(NSURLConnection *)connection didReceiveData:(NSData
> *)data {
> NSString *responseString = [[[NSString alloc]  initWithData:data
> encoding:NSUTF8StringEncoding] autorelease];
>  NSDictionary *dictionary = (NSDictionary *) [parser
> objectWithString:responseString error:nil];
> NSDictionary *user = (NSDictionary *) [dictionary valueForKey:@"user"];
>  if([user valueForKey:@"screen_name"] != nil) {
> Tweet *tweet = [[Tweet alloc] init];
>  [tweet setScreenName:[user valueForKey:@"screen_name"]];
> [tweet setLink:[user valueForKey:@"profile_image_url"]];
>  [tweet setMessage:[dictionary valueForKey:@"text"]];
>                 //do something
> [tweet release];
>  }
> }
>
>


-- 
Subscription settings: 
http://groups.google.com/group/twitter-development-talk/subscribe?hl=en

Reply via email to