joshua.lyon Wrote:I noticed that in a previous post you mentioned that the team was looking at this as a good point in time to draw a line in the sand and basically say that the JSON API is different between XBMC 10 and 11 [paraphrased].
Absolutely correct.
joshua.lyon Wrote:As noted in the quoted post, the change from 'fields' to 'properties' basically breaks any jsonRPC app that's requesting library data. I'm just curious why the team decided not to maintain backwards compatibility (especially on that item)... or why even make the change from 'fields' to 'properties' in the first place?
You gave the answer to the backwards compatibility yourself in the first paragraph. I had to make soo many changes to our jsonrpc implementation and API just to make it JSON-RPC 2.0 compliant that we already had to give up on backwards compatibility just to follow the specification.
joshua.lyon Wrote:Up until that change, I've been able to maintain compatibility between Dharma and Eden without having to maintain major logic for different versions. While it's not a huge pain, app developers now have to maintain logic that determines the XBMC version and then issues specific requests accordingly.
That only holds true for the AudioLibrary, VideoLibrary and Files namespaces. All the other namespaces have undergone drastic changes:
- AudioPlayer, VideoPlayer and PicturePlayer have all been merged to Player
- AudioPlaylist, VideoPlaylist and Playlist have all been merged to Playlist
- Some methods in JSONRPC namespace have been renamed
- Most methods in XBMC namespace have either been removed or moved to a different namespace (Application namely)
As you can see we already had to break backwards compatibility for all those namespaces just to get a clean API on which we can build in the future without having to break backwards compatibility again.
The main reasons for renaming "fields" to "properties" was that
1. in our opinion (topfs2, ronie and me) "properties" is a better describing name than "fields" for the properties of a media item ("fields" sounds so database-ish)
2. with the introduction of GetProperties methods (which take a "properties" parameter to retrieve needed properties) in the System, XBMC, Playlist and Player namespace renaming "fields" to "properties" helped to achieve a uniform naming of parameters across methods and namespaces.