[OPEN-ILS-DEV] Different OSRF response format from different servers?

Bill Erickson berickxx at gmail.com
Wed Jan 25 10:38:03 EST 2017


Hi Ken,

I can't say why they vary in this specific case, but it's not uncommon for
numbers to be packaged as JSON strings throughout Evergreen / OpenSRF.
Generally, Perl and JavaScript don't care and the OpenSRF JSON C library is
well-equipped to handle it.  It's probably best to assume that any number
might be delivered as a JSON number or a JSON string.

-b




On Tue, Jan 24, 2017 at 5:03 PM, Ken Cox <kenstir at gmail.com> wrote:

> I have a bug report that searching the Missouri Evergreen catalog crashes
> the Android Hemlock App
> <https://play.google.com/store/apps/details?id=net.kenstir.apps.hemlock>.
> I tracked it down to different results from the open-ils.search.biblio.mul
> ticlass.query .  The server at issourievergreen.org returns an "ids" list
> containing integers, and the other servers I tried return an "ids" list
> containing strings.
>
> Is this expected?  Handling this one mismatch is straightforward, but I'm
> wondering how many similar issues lurk behind this one.
>
> Sample search queries and excerpted results for "pride and prejudice":
>
> *missourievergreen, version 2-11-0*
>
> https://missourievergreen.org/osrf-gateway-v1?service=open-i
> ls.search&method=open-ils.search.biblio.multiclass.query&par
> am=%7B%22org_unit%22:1,%22default_class%22:%22keyword%22,%
> 22offset%22:0,%22limit%22:2,%22depth%22:0%7D&param=%22pride
> %20and%20prejudice%22&param=1
> ...
> "ids":[[32673,null,"0.0"],[886843,null,"0.0"]]
>
> *gapines**, version **2-11-1*
>
> https://gapines.org/osrf-gateway-v1?service=open-ils.search&
> method=open-ils.search.biblio.multiclass.query&param=%7B%22o
> rg_unit%22:1,%22default_class%22:%22keyword%22,%22offset%22:
> 0,%22limit%22:2,%22depth%22:0%7D&param=%22pride%20and%
> 20prejudice%22&param=1
> ...
> "ids":[["503610",null,"0.0"],["502717",null,"0.0"]]
>
> *cwmars**, version **2-10-7*
>
> http://bark.cwmars.org/osrf-gateway-v1?service=open-ils.search&method=open-ils.search.biblio.multiclass.query&param=%7B%22org_unit%22:1,%22default_class%22:%22keyword%22,%22offset%22:0,%22limit%22:2,%22depth%22:0%7D&param=%22pride%20and%20prejudice%22&param=1...
> "ids":[["1805532"],["2385399"]]
>
>
>
> --
> -Ken
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://libmail.georgialibraries.org/pipermail/open-ils-dev/attachments/20170125/27c11b37/attachment-0001.html>


More information about the Open-ils-dev mailing list