[build] graph builder: use str() instead of json to store graph data (json can’t store interger as keys)