# Is there a json module yet?

**URL:** <https://forum.ansible.com/t/is-there-a-json-module-yet/21334>\
**Category:** Ansible Project\
**Created:** [May 2, 2016, 6:57pm UTC](https://forum.ansible.com/t/is-there-a-json-module-yet/21334 "2016-05-02T18:57:07Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Will\_LaSeur](https://avatars.discourse-cdn.com/v4/letter/w/6bbea6/32.png) [@Will\_LaSeur](https://forum.ansible.com/u/Will_LaSeur)\
**Post date:** [May 2, 2016, 6:57pm UTC](https://forum.ansible.com/t/is-there-a-json-module-yet/21334/1 "2016-05-02T18:57:07Z")

</div>

I’m looking for a quick way to update a json file without needing to template the file. I want to be able to change the values each time a job is being run based on user input.

I tried this: [http://www.geekytidbits.com/ansible-module-modify-json/](http://www.geekytidbits.com/ansible-module-modify-json/)

But was unsuccessful to get it working.

Thanks!

Will

---

<div class="post-metadata">

**Author:** ![Dan\_Lang](https://avatars.discourse-cdn.com/v4/letter/d/3e96dc/32.png) [@Dan\_Lang](https://forum.ansible.com/u/Dan_Lang)\
**Post date:** [May 3, 2016, 7:27pm UTC](https://forum.ansible.com/t/is-there-a-json-module-yet/21334/2 "2016-05-03T19:27:15Z")

</div>

Would the [lineinfile](http://docs.ansible.com/ansible/lineinfile_module.html) module be sufficient? If you’re updating a single line in your JSON file, this seems appropriate.

---

<div class="post-metadata">

**Author:** ![james4](https://avatars.discourse-cdn.com/v4/letter/j/9f8e36/32.png) [@james4](https://forum.ansible.com/u/james4)\
**Post date:** [May 4, 2016, 6:27pm UTC](https://forum.ansible.com/t/is-there-a-json-module-yet/21334/3 "2016-05-04T18:27:15Z")

</div>

or from\_json filter, modify in ansible, and write it back.

what’s limiting the use of templates?

---

<div class="post-metadata">

**Author:** ![Will\_LaSeur](https://avatars.discourse-cdn.com/v4/letter/w/6bbea6/32.png) [@Will\_LaSeur](https://forum.ansible.com/u/Will_LaSeur)\
**Post date:** [May 5, 2016, 5:12pm UTC](https://forum.ansible.com/t/is-there-a-json-module-yet/21334/4 "2016-05-05T17:12:30Z")

</div>

I’m using a replace to inject the values I get from the user. I just don’t really need a template for this one.
