Hi ,

I have following problem: 
Using CommonsHttpSolrServer (javabin format) I do a query with wt=json and
get following response (by using  qresponse = solr.query(params); and then
qresponse.toString();

{responseHeader={status=0,QTime=16,params={indent=on,start=0,q=mmm,qt=dismax,wt=[javabin,
javabin],hl=on,rows=10,version=[1,
1]}},response={numFound=0,start=0,docs=[]},highlighting={}}

Now this does not seems to be JSON format (or is it ) ?

Should the equal sign not be a ':' and the values surrounded with double
quotes ?

The problem is that I want to pass the qresponse to a Javascript variable so
the client javascript code can then inspect the JSON response and do
whatever is needed.

What I did was:

 var str = "<%=qresponse.toString()%>"; 

but I can't seem to correctly read the str variable as a JSON object and
parse it (on the client side).

Any ideas or code snippets to show the correct way ?

Regards,

St.





-- 
View this message in context: 
http://www.nabble.com/SolrJ-and-Json-tp26022705p26022705.html
Sent from the Solr - User mailing list archive at Nabble.com.

Reply via email to