Export to GitHub

bitly-api - issue #2

XML response is invalid for any result collection that creates nodes by the hash name, if that hash starts with a number


Posted on Feb 27, 2009 by Grumpy Lion

What steps will reproduce the problem? 1. Make an api request on a method that returns data keyed under a hash name (like info). 2. Use a hash that starts with a number, specifying XML as the format: http://api.bit.ly/expand? version=2.0.1&shortUrl=http://bit.ly/31IqMl&login=bitlyapidemo&apiKey=R_0da49e0a9118ff35f5 2f629d2d71bf07&format=xml

What is the expected output? What do you see instead? A valid XML document should be returned, otherwise it's useless.

A simple solution could be to introduce a <hash> element with a required attribute to carry the actual hash: <hash name="31IqMl">...</hash>. In addition, the XML can't be semantic without consistent elements.

Comment #1

Posted on Jul 21, 2009 by Swift Cat

This is a major issue since it's not a valid XML. Is there any timeframe for correction?

Comment #2

Posted on Jul 23, 2009 by Happy Horse

This will be resolved in version 3.0 of the API.

Comment #3

Posted on Aug 31, 2009 by Swift Bear

When is version 3.0 coming out?

Comment #4

Posted on Oct 15, 2009 by Swift Horse

This is a major bug.

Please give to this issue the importance that it deserves.

Thanks.

Comment #5

Posted on Oct 18, 2009 by Happy Horse

(No comment was entered for this change.)

Comment #6

Posted on Jan 19, 2010 by Quick Bird

This is also an issue with json because you can't serialze either xml or json into an object when you have a property name (based on hash) that is constantly changing. This was an incredibly poor design choice, demonstrating a basic lack of understanding about how any developer would use the api. This flaw makes the api almost useless for most developers unless they want to use regular expressions to parse the text that is returned.

Comment #7

Posted on Mar 30, 2010 by Happy Horse

this is now fixed with the release of v3 bit.ly api

Status: Verified

Labels:
Type-Defect Priority-Medium