Generates Vagrant files out of Json files

I am trying to provision and maintain topology vms by using vagrant. I am new to vagrant and the topology data is in json format. So i am wondering if there is way that you can convert json files to vagrant files. to create these topology vms (leafs,spine and etc).

It’s not 100% what you are describing, but I found this. In this case a json is used and included in the Vagrant file.

# Require 'yaml' module
require 'yaml'

# Read YAML file with VM details (box, CPU, RAM, IP addresses)
# Edit machines.yml to change VM configuration details
machines = YAML.load_file(File.join(File.dirname(__FILE__), 'machines.yml'))