<< Back to previous view

[DJSON-5] data.json 0.2.0 must provide 0.1.x API compatibility layer Created: 24/Oct/12  Updated: 10/Jan/14  Resolved: 27/Oct/12

Status: Closed
Project: data.json
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Defect Priority: Major
Reporter: Michael Klishin Assignee: Stuart Sierra
Resolution: Completed Votes: 0
Labels: None


For libraries that rely on data.json the 0.2 release was a major unexpected breakage. For example, for
Monger to support 3 JSON serializers (Cheshire, c.d.j 0.1.x, c.d.j 0.2.x) we had to do this:

This is some of the craziest code I've seen. While writing it, I realized that several changes
in the c.d.j. API were easy to shim with a backwards-compatibility function. clojure.data.json/json-str
can be implemented on top of the new function easily, for example.

clojure.data.json demonstrates very questionable library maintenance practices and the 0.2 release
already cased a lot of confusion and pain to the community. There was 0 communication about the changes upfront, this shows lack of respect to the community and care about backwards compatibility.

So, bringing back a shim API layer for 0.1.x compatibility is a must. There are many codebases on clojure.data.json 0.1.x and their developers probably are not going to stop doing what they are doing
and deal with unnecessary c.d.j. API changes. Other library maintainers that extend or depend on c.d.j.
are caught between a rock and a hard place.

Comment by Michael Klishin [ 24/Oct/12 4:07 PM ]

According to clojuresphere.com, data.json is relied on by 340+ projects: http://www.clojuresphere.com/org.clojure/data.json

Comment by Tim McCormack [ 24/Oct/12 4:11 PM ]

Alternative suggestion: Mark the library as "under development/API subject to change" while < v1.0.

Comment by Michael Klishin [ 24/Oct/12 4:12 PM ]

@Tim McCormack: if a project is used by over 300 other projects and has been around for about a year, it is just lame to use excuses like that. It is too late, too many people already
use c.d.j.

Comment by Stuart Sierra [ 27/Oct/12 1:09 PM ]

Old APIs restored, documented as "DEPRECATED", in release 0.2.1.

Comment by Stuart Sierra [ 10/Jan/14 11:10 AM ]

Marking old issues as 'closed'

Generated at Thu Feb 23 08:56:17 CST 2017 using JIRA 4.4#649-r158309.