-
Notifications
You must be signed in to change notification settings - Fork 13
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Error reading records from demo.ckan.org #41
Comments
Hi Piotr, thanks for the report. In Jackan we 'invented' the field |
David, Thank you for responding so quickly. Studying your code I can tell that this is not a trivial problem. Perhaps it is possible to avoid collisions like that to some extent by creating own deserializer. Technically, it's not that hard. But here is a real problem: Jackan "others" and CKAN "others" are semantically completely different values even regardless the actual type in Java code. What I mean is the meaning of those two fields are different, therefore it really make sense to rename "others" into "jackanOthers" or even drop it completely. The twist comes when you realize that public methods getOthers(), setOthers() and putOthers() are (willingly or unwillingly) part of your API, and you can not change it without breaking somebody's code who may be using Jackan library already. Anyway, great library and great and mature design. I hope, you can tackle "others" issue some thay in the future. |
Hi Piotr, thanks for the positive comments! I gave a better look at the problem. Looking at the official CKAN schema, there is no Anyway when I find the time I'm going to fix the problem. I will try to avoid breaking the current api. |
I have an issue reading certain records from demo.ckan.org which have "others" property populated with a simple string.
Example of such an record is:
http://demo.ckan.org/api/3/action/package_search?q=id:69c59a57-9ff3-43ff-915a-3a1c04bc4d80
You can see that there is a property others: "qui1hfv3qtm85lg2iokob6lg1m" within the very first resource entry.
It appears that Jackan fails to load this resource because it attempts to load a simple string into the private Map<String, Object> others bean property as defined in CkanResourceBase class.
The text was updated successfully, but these errors were encountered: