fix bug when type of root item neither ARRAY nor OBJECT