Closed GoogleCodeExporter closed 9 years ago
Storing state in a shared map will compromise thread-safety. So, if we were to
address this in Gson, we should be using ThreadLocal. However, that doesn't
really
seem all that more convenient than the clients using ThreadLocal directly. So,
we
decided not to implement this feature.
Original comment by inder123
on 12 Mar 2009 at 8:59
In case the feature is rejected, please attach the recipe on how to use
ThreadLocal
variable. Solving my problem, my custom deserialization of Json element depends
on
its parent element's data. There is no way to get the parent from within of:
public JDataFieldModel deserialize(JsonElement json, Type typeOfT,
JsonDeserializationContext context) throws JsonParseException
{
... json.getParent().get("field"); ?
}
Original comment by Anton.Troshin@gmail.com
on 18 Mar 2010 at 10:33
Original issue reported on code.google.com by
inder123
on 10 Jan 2009 at 4:24