JSON generation fix - topmost nodes can't be represented as arrays but rather as a hashmap