fix JSON export when called from generic container

see #68