Test::JSON Now Failing

Ovid on 2007-12-20T09:28:01

My Test::JSON currently has 2 failures out of 106 test reports sent. One failure appears to be a messed up Perl installation, but the one I received yesterday is due to the JSON module being updated in a non-backwards compatible way. Apparently, there was a deprecation period of a whopping twelve days (going by the date of the first release of the new API to 2.0). I had not heard that there was going to be a new API and the author has made it clear that he won't support the old API.

Now I'll have to get a new release of Test::JSON out the door. Do I go through the trouble of allowing it to support the older JSON module in addition to the new API? I might. Frankly, I'm frustrated to be caught completely off guard by such a radical change in this important module, though I realize I'm not the first. But a twelve day deprecation period is ridiculous. And was this even at least announced anywhere? I might even look to switching to a different JSON module with an author who is less likely to pull the rug out from under me so quickly.


What would you choose?

perigrin on 2007-12-20T13:56:43

I currently have failing tests with JSON::Any because JSON::XS decided to make a similar (not the same mind you but related) API change without a deprecation period *at all* (and in a point release no less!).

So really what would the alternative be?

Re:What would you choose?

Ovid on 2007-12-20T14:12:23

:(

This is very frustrating. I guess I really can't recommend anything. I'd be tempted to say JSON::Syck as Tatsuhiko's pretty sharp and is unlikely to break everyone's code without warning, but I see there are a number of serious bug reports and it doesn't appear to be widely used :/

Re:What would you choose?

perigrin on 2007-12-20T17:28:59

Well I just fixed JSON::Any to work, and since I didn't have to change a single test I suspect I'm 100% backwards compatible to what you're running. Sooo ... might I suggest JSON::Any?

Yikes! Thanks for the headsup!

renodino on 2007-12-20T16:40:53

Wow. I would have been kicking holes in walls and frothing at the mouth trying to debug if I hadn't seen your post, and wandered over to CPAN. "He couldn't possibly mean the 2 main methods in the module...could he ?"

Yep.

I think I've just discovered a new definition of arbitrary and capricious. But it appears the author has backed off for a bit...and will instead grace us with nagging warnings.

Re:Yikes! Thanks for the headsup!

Ovid on 2007-12-20T16:48:10

Ah, that's a relief. I'll take the warnings over the breakage any day of the week :)

Re:Yikes! Thanks for the headsup!

Aristotle on 2007-12-20T18:06:08

Heh, at first I read the word in the subject of the comment as “headsoup” – and considering the issue at hand, that would be apt enough…