sebonlien / bitly-api

Automatically exported from code.google.com/p/bitly-api
0 stars 0 forks source link

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

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
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_0da49e0a
9118ff35f5
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.

Original issue reported on code.google.com by ch...@rosaloves.com on 27 Feb 2009 at 10:38

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

Original comment by bruno.r.figueiredo on 21 Jul 2009 at 11:53

GoogleCodeExporter commented 8 years ago
This will be resolved in version 3.0 of the API.

Original comment by kort...@gmail.com on 23 Jul 2009 at 1:47

GoogleCodeExporter commented 8 years ago
When is version 3.0 coming out?

Original comment by goo...@trimediatlantic.com on 31 Aug 2009 at 4:10

GoogleCodeExporter commented 8 years ago
This is a major bug.

Please give to this issue the importance that it deserves.

Thanks.

Original comment by gonzalol...@gmail.com on 15 Oct 2009 at 2:51

GoogleCodeExporter commented 8 years ago

Original comment by jehiah on 18 Oct 2009 at 7:26

GoogleCodeExporter commented 8 years ago
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.

Original comment by impulsec...@gmail.com on 19 Jan 2010 at 9:39

GoogleCodeExporter commented 8 years ago
this is now fixed with the release of v3 bit.ly api

Original comment by jehiah on 30 Mar 2010 at 8:45