added hierarchy generator to take in non-flare JSON