Made changes to jsonmain.cpp and moved functionality to base class jsonitem.h