Hi, Im using Jersey together with JAXB and Lucene.
I have a JAXB class which I marshall to a JSON String representation
and store in a lucene index, together with some search fields. Then when
a user gets a match I unmarshall the JSON back to the original class and
not all fields are populated. If I marshal to XML instead it works fine,
but the amount of space used by an XML field is significantly larger and
the indexing takes longer so I would rather use JSON, Java serialization
is even worse.
So the Json String is
correct:{"type":"group","id":"4302e264-1cf0-4d1f-aca7-2a6f89e34b36","name":"Farming
Incident","sort-name":"Farming
Incident","gender":"male","country":"af","life-span":{"begin":"1999-04","end":""}}
but when unmarshalled back into Artist class, the LifeSpan class is not
completed, i.e artist.getLifeSpan().getBegin() returns null when it
should return "1999-04", fields at the top level (such as name,sort-name
are okay)
Is this a bug/limitation in Json or am I doing something wrong
thanks Paul