using json files as input for diagraph with json.decode