Fix JSON type error on graph construction.