# Painless script to jsonify

**URL:** <https://discuss.elastic.co/t/painless-script-to-jsonify/250854>\
**Category:** Kibana\
**Tags:** painless\
**Created:** [October 3, 2020, 2:24am UTC](https://discuss.elastic.co/t/painless-script-to-jsonify/250854 "2020-10-03T02:24:40Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Narendra\_Jain](https://avatars.discourse-cdn.com/v4/letter/n/2bfe46/32.png) [@Narendra\_Jain](https://discuss.elastic.co/u/Narendra_Jain)\
**Post date:** [October 3, 2020, 2:24am UTC](https://discuss.elastic.co/t/painless-script-to-jsonify/250854/1 "2020-10-03T02:24:40Z")

</div>

I have index with http response body stored as string json, is it possible to treat json as string to json to read as json using json path.

---

<div class="post-metadata">

**Author:** ![Marius\_Dragomir](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/marius_dragomir/32/42087_2.png) [@Marius\_Dragomir](https://discuss.elastic.co/u/Marius_Dragomir)\
**Post date:** [October 5, 2020, 3:56pm UTC](https://discuss.elastic.co/t/painless-script-to-jsonify/250854/2 "2020-10-05T15:56:54Z")

</div>

You can use most Java functions in Painless, but this is really not recommended. If you want to do processing on a field of that size, please use Logstash or Ingest Pipelines as this can be a really costly operation.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [November 2, 2020, 3:57pm UTC](https://discuss.elastic.co/t/painless-script-to-jsonify/250854/3 "2020-11-02T15:57:00Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
