I'm not so sure about the artist objects in artist credits
they do not have the same schema as other artist objects
warp
why don't they have the same schema?
ocharles
in artist objects, omission of certain properties implies they are null, but in artist credits it implies we're just not showing you that data (but it might not be null)
right?
warp
hm, I don't think our XML is very clear about that.
in general our XML omits stuff you didn't request
ocharles
oh, this is just to be the same as /ws/2/
i guess it's ok then
warp
so the distinction between omitted and null isn't clear in our XML either. is there even a distinction? :)
ocharles
no
kurtjx joined the channel
kurtjx joined the channel
reosarevok
Hmm
Do we actually have null ACs?
warp
reosarevok: properties of artists can be null. e.g. not every artist has a disambig comment.
reosarevok
Sure, but then surely if it does have one we'd show it?
warp
reosarevok: in the webservice, not quite.
reosarevok
Why shouldn't we?
(if I'm making very silly questions, stop me :) )
warp
reosarevok: for example, a release has mediums with tracklists with tracks with recordings
reosarevok: just that something is missing from the webservice output doesn't mean the value is null or empty in the database.
reosarevok
Ok, I guess my point was more "we either show them all, and then if we don't it's not there, or show none, and then none are shown"
(but it'd be quite confusing if we showed some but not some others of the same thing with the same query)
warp
reosarevok: in general the output of the webservice is somewhat tailored for specific use cases, and information we didn't think was relevant is omitted by default to save bandwidth.
reosarevok: and that's why you can do ?inc=foo to make the server include those things which you think are relevant.
reosarevok
Sure, but then, if we just don't include something, there's no possible confusion so why does it matter?
warp
reosarevok: well, the confusion is then that the client who gets to interpret the webservice response can never know if something was merely omitted from the results or if it is actually null in the database.
reosarevok
But reasonably enough, if it cares it should actually query for it?
warp
yes, so you when you write your code to interpret the results, you have to take into account whether certain bits of data or normally included with the type of request you did.
reosarevok
So, the JSON doesn't need to take this into account, the documentation does
And to avoid it being unclear it just needs clear documentation
That's what I read from this :)
warp
I'd be in favour of just Doing It Right
reosarevok
For ws/3? :p
warp
so that e.g. if an artist doesn't have a disambig comment, we include "disambiguation": null
reosarevok
Oh, that sounds reasonable, yes
ocharles
new schema doesn't allow null for disambiguation, but that's an aside :)
warp
so that if the "disambiguation" key is missing you know that the server omitted it.
ocharles: which new schema?
ocharles
warp: NES
warp
ah, so disambig is just "" then?
ocharles
yea
warp
seems... odd.
ocharles
NULL does not mean absent
it means unknown
but we know that this artist has an empty comment
warp
oh, right. you are correct.
ocharles
same why a null joinphrase is a bit funky
(and has caused us problems)
warp
ocharles: any other comments on /Web_Service/JSON ?
ocharles
warp: i haven't quite looked in detail yet, but nothing stands out as wrong
warp
do you think it's ok to make the relations one list?
ocharles
yea, i don't see why not
warp
it's seperate in the xml, but that just seemed annoying to me :)
ocharles: ok, thanks for taking a look. I'll post it to mb-devel.