# Export.json with a constant ordering

**URL:** <https://discuss.elastic.co/t/export-json-with-a-constant-ordering/104048>\
**Category:** Kibana\
**Created:** [October 16, 2017, 6:29am UTC](https://discuss.elastic.co/t/export-json-with-a-constant-ordering/104048 "2017-10-16T06:29:42Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![zezz](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/zezz/32/17169_2.png) [@zezz](https://discuss.elastic.co/u/zezz)\
**Post date:** [October 16, 2017, 6:29am UTC](https://discuss.elastic.co/t/export-json-with-a-constant-ordering/104048/1 "2017-10-16T06:29:42Z")

</div>

When you want to put kibana 4 export.json under git (or any VC system), you'll see that the file changes even if you did not touch searches, vizs or dashboards. The script below uses jq to keep kibana 4 objects (and object keys) in a constant order. Thus, no diffs if you left your kibana untouched. And more git friendly!  
Here is the gist : [https://gist.github.com/jpparis-orange/e79dbfae1cba54799b1476fb4ddfed93](https://gist.github.com/jpparis-orange/e79dbfae1cba54799b1476fb4ddfed93)

Would it be good to have Kibana itself exporting objects with a constant order?

---

<div class="post-metadata">

**Author:** ![Stacey\_Gammon](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/stacey_gammon/32/14025_2.png) [@Stacey\_Gammon](https://discuss.elastic.co/u/Stacey_Gammon)\
**Post date:** [October 17, 2017, 8:01am UTC](https://discuss.elastic.co/t/export-json-with-a-constant-ordering/104048/2 "2017-10-17T08:01:16Z")

</div>

Once we say "our json order is deterministic", it's something we'd have to keep up long term, so while it does sound useful, I'm not sure it's something we'd want to implement. I suggest you add this as a feature request in the Kibana repo ([https://github.com/elastic/kibana/issues](https://github.com/elastic/kibana/issues)) and tag it with discuss so other team members can weigh in as well.

---

<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 14, 2017, 8:01am UTC](https://discuss.elastic.co/t/export-json-with-a-constant-ordering/104048/3 "2017-11-14T08:01:49Z")

</div>

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