I have added a search method to the JSON service so that you can write
"almost arbitrary" queries across some 38 different fields in the
database and get the results back as JSON objects. There are =, > and
< for numeric and date fields. There are =, != , LIKE and NOT LIKE
operators for string fields. There is ordering, limit and offset.
There are also some bugs that I don't know about!
Please have a play and let me know what you think.
http://biocol.org/json
I have also refactored the existing fetch method for retrieving
collections by LSID. It should behave as before but I may have
introduced bugs so please be aware of this and tell me about them.
I am still returning each collection as a JSON object with some 40
fields in many of which will be null. I'd like opinions on how to
improve on this or whether I should. Options are:
1) change nothing.
2) don't return fields if they contain null (lots of space saved, easy
to implement server side by client side you have to keep checking if
properties are defined or not).
3) allow definition of fields to be returned (we still need to decide
what happens if no field list is defined).
4) require definition of fields to be returned (barrier to naive use
of the system).
All the best,
Roger