.xml vs .json endpoints

Feb 23, 2012 at 4:29 PM

Hi,
I ran a fairly large set of queries this morning using your latest changeset linqtotwitter-96326 and I noticed that most *RequestProcessor classes still target .xml endpoints (see list below). As you know, .json endpoints are preferred for performance (smaller response payload) and maintainability (twitter commitment to json) reasons. I was wondering if you plan to publish a linqtotwitter version with full json support in the near future or you'd advise (for advanced users) to refactor the library themselves. There are other .NET-based libraries I could consider of course, but linqtotwitter seems to have the best response processing features.


Thanks,


00101: return new Request(BaseUrl + "blocks/blocking/ids.xml");00076: var req = new Request(BaseUrl + "favorites.xml");00131: return new Request(BaseUrl + "friendships/no_retweet_ids.xml");00142: var req = new Request(BaseUrl + "friendships/exists.xml");00186: var req = new Request(BaseUrl + "friendships/show.xml");00224: var req = new Request(BaseUrl + "friendships/incoming.xml");00244: var req = new Request(BaseUrl + "friendships/lookup.xml");00266: var req = new Request(BaseUrl + "friendships/outgoing.xml");00048: return new Request(BaseUrl + "help/test.xml");00050: return new Request(BaseUrl + "help/configuration.xml");00052: return new Request(BaseUrl + "help/languages.xml");00072: var req = new Request(BaseUrl + "privacy.xml");00084: var req = new Request(BaseUrl + "tos.xml");00256: var req = new Request(BaseUrl + "lists/all.xml");00288: var req = new Request(BaseUrl + "lists.xml");00333: var req = new Request(BaseUrl + @"lists/show.xml");00384: var req = new Request(BaseUrl + "lists/statuses.xml");00483: var req = new Request(BaseUrl + "lists/memberships.xml");00530: var req = new Request(BaseUrl + "lists/subscriptions.xml");00575: var req = new Request(BaseUrl + "lists/members.xml");00647: var req = new Request(BaseUrl + "lists/members/show.xml");00719: var req = new Request(BaseUrl + "lists/subscribers.xml");00791: var req = new Request(BaseUrl + "lists/subscribers/show.xml");00099: return new Request(BaseUrl + "saved_searches.xml");00332: return new Request(BaseUrl + "statuses/public_timeline.xml");00160: var req = new Request(BaseUrl + "users/search.xml");00196: var req = new Request(BaseUrl + "users/lookup.xml");00227: var req = new Request(BaseUrl + "users/suggestions/" + Slug + ".xml");00247: var req = new Request(BaseUrl + "users/suggestions.xml");00271: var req = new Request(BaseUrl + "users/suggestions/" + Slug.ToLower() + "/members.xml");

00062: url = BaseUrl + "account/verify_credentials.json";00065: url = BaseUrl + "account/rate_limit_status.json";00068: url = BaseUrl + "account/totals.json";00071: url = BaseUrl + "account/settings.json";00145: var req = new Request(BaseUrl + "geo/search.json");00244: var req = new Request(BaseUrl + "geo/reverse_geocode.json");00141: var req = new Request(BaseUrl + "statuses/filter.json");00180: var req = new Request(BaseUrl + "statuses/firehose.json");00204: var req = new Request(BaseUrl + "statuses/links.json");00228: var req = new Request(BaseUrl + "statuses/retweet.json");00250: var req = new Request(BaseUrl + "statuses/sample.json");00144: var req = new Request(BaseUrl + "trends/available.json");


Coordinator
Feb 23, 2012 at 5:59 PM

Hi Celmis,

Totally agree.  The original implementation highlighted LINQ to XML because LINQ to Twitter originated as a sample in my book, LINQ Programming/McGraw-Hill (please pardon the shameless plug). Lately, Twitter has been adding new features to json endpoints only, which indicates their preference too.  i.e. new Trends APIs and entities in the Search API.  I'm currently on path to convert all endpoints to JSON.  Status so far is that I have libraries in-place for all platforms (desktop/Web, Silverlight, and Windows Phone) and have converted a few API's over as proof-of-concept (also, because I had to in a couple cases).  I'll be gradually moving all the APIs over until I'm at 100%.  If there are any API's that you or anyone else prefers that I convert first, let me know and I'll put those at the top of the queue.  It will be a gradual conversion, as time allows.

Joe