: We're started to migrate our integration-framework to move over to : JavaEE JSON-B as default json-serialization /deserialization framework : and now the highlighning component is giving us some troubles. Here's a : constructed example of the JSON response from Solr.
Wait .. what? that makes no sense to me... IIUC JSON-B is is a *binding* frameworkd -- it is intended as a replacement for things like java's built in (binary) serialization, or JXB's XML serialization -- where you have java class definitions that you annotate with information on how to serialize them, and how to repopulate them when deserializting a byte stream. Attempting to use JSON-B as an end-all-be-all general purpose "json parser" to read arbitrary JSON from systems that do *NOT* use JSON-B seems.... absurd. *Nothing* about the JSON-B documentation (that i've seen) suggests that anyone involved in JSON-B would even remotely suggest/recommend you attempt to use it to parse JSON that was not *generated* by JSON -- like all binding APIs i've ever seen, it assumes/expects that the person desgning the (Java) Object API will dictate (via annotations or default bindings) the serialization details and the framework will take care of the validity of the byte stream representation and the deserialization. i would *strongly* urge you to rethink attempting to use JSON-B to parse Solr's response documents .... the "key" in highlighting response will be the least of your problems once you decide you want ot use "facets" -- or hell, once someone adds a new query param to your request that gets echoed back. -Hoss http://www.lucidworks.com/