Skip to content

Commit

Permalink
json: let read TCollection-derived classes with
Browse files Browse the repository at this point in the history
TBufferJSON::ConvertFromJSONAny

In some special cases (list std::vector<> or TArrayI) class information
is not stored in JSON, therefore expected class should be provided. But
this requirement can be relaxed for TList/TObjArray/... classes.
  • Loading branch information
linev authored and pcanal committed Dec 19, 2017
1 parent 7fc0aaf commit 92c89f1
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions io/io/src/TBufferJSON.cxx
Expand Up @@ -1668,6 +1668,9 @@ void *TBufferJSON::JsonReadObject(void *obj, const TClass *objClass, TClass **re
if (gDebug > 1)
Info("JsonReadObject", "Reading object of class %s refid %u ptr %p", clname.c_str(), fJsonrCnt, obj);

if (!special_kind)
special_kind = JsonSpecialClass(jsonClass);

// add new element to the reading map
fReadMap[fJsonrCnt++] = ObjectEntry(obj, jsonClass);
}
Expand Down

0 comments on commit 92c89f1

Please sign in to comment.