# Auto generating json data

**URL:** <https://discourse.chef.io/t/auto-generating-json-data/5135>\
**Category:** Chef Infra (archive)\
**Created:** [March 18, 2014, 1:12pm UTC](https://discourse.chef.io/t/auto-generating-json-data/5135 "2014-03-18T13:12:56Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Elvin\_Abordo](https://avatars.discourse-cdn.com/v4/letter/e/4af34b/32.png) [@Elvin\_Abordo](https://discourse.chef.io/u/Elvin_Abordo)\
**Post date:** [March 18, 2014, 1:12pm UTC](https://discourse.chef.io/t/auto-generating-json-data/5135/1 "2014-03-18T13:12:56Z")

</div>

Hello Chefs,

OPs guy here.

I’m trying to write a simple tool to auto generate json roles and  
environments as manually editing/upping json files has proven a fruitless  
venture for some of my team members.

I’ve looked at a couple of OS level tools that might do the trick such as  
jsontools and possibly jq. but i’d like to hear some ideas from the  
community.

## Thanks in advanced.

Elvin Abordo

---

<div class="post-metadata">

**Author:** ![coderanger](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.chef.io/coderanger/32/5_2.png) [@coderanger](https://discourse.chef.io/u/coderanger)\
**Post date:** [March 18, 2014, 5:15pm UTC](https://discourse.chef.io/t/auto-generating-json-data/5135/2 "2014-03-18T17:15:11Z")

</div>

Just use one of the native Chef API clients like Chef itself or PyChef to talk to the chef server from a script.

--Noah

On Mar 18, 2014, at 6:12 AM, Elvin Abordo [elvin159@gmail.com](mailto:elvin159@gmail.com) wrote:

> Hello Chefs,
> 
> OPs guy here.
> 
> I'm trying to write a simple tool to auto generate json roles and environments as manually editing/upping json files has proven a fruitless venture for some of my team members.
> 
> I've looked at a couple of OS level tools that might do the trick such as jsontools and possibly jq. but i'd like to hear some ideas from the community.
> 
> ## Thanks in advanced.
> 
> Elvin Abordo

---

<div class="post-metadata">

**Author:** ![Seth\_Vargo2](https://avatars.discourse-cdn.com/v4/letter/s/ccd318/32.png) [@Seth\_Vargo2](https://discourse.chef.io/u/Seth_Vargo2)\
**Post date:** [March 18, 2014, 9:11pm UTC](https://discourse.chef.io/t/auto-generating-json-data/5135/3 "2014-03-18T21:11:23Z")

</div>

If you want to stay with Ruby, ChefAPI can do this easily: [GitHub - chef-boneyard/chef-api: DEPRECATED: A tiny Chef API client with minimal dependencies](https://github.com/sethvargo/chef-api)

Thanks,  
Seth

On Mar 18, 2014, at 1:15 PM, Noah Kantrowitz [noah@coderanger.net](mailto:noah@coderanger.net) wrote:

> Just use one of the native Chef API clients like Chef itself or PyChef to talk to the chef server from a script.
> 
> --Noah
> 
> On Mar 18, 2014, at 6:12 AM, Elvin Abordo [elvin159@gmail.com](mailto:elvin159@gmail.com) wrote:
> 
> > Hello Chefs,
> > 
> > OPs guy here.
> > 
> > I'm trying to write a simple tool to auto generate json roles and environments as manually editing/upping json files has proven a fruitless venture for some of my team members.
> > 
> > I've looked at a couple of OS level tools that might do the trick such as jsontools and possibly jq. but i'd like to hear some ideas from the community.
> > 
> > ## Thanks in advanced.
> > 
> > Elvin Abordo
