# GenerateJSON \`expanded\` property broken?

**URL:** <https://forum.xojo.com/t/generatejson-expanded-property-broken/68310>\
**Category:** Bugs and Feature Requests\
**Created:** [February 2, 2022, 10:28pm UTC](https://forum.xojo.com/t/generatejson-expanded-property-broken/68310 "2022-02-02T22:28:15Z")\
**Posts on this page:** 12\
**Page:** 1

<div class="post-metadata">

**Author:** ![GarryPettet](https://forum.xojo.com/user_avatar/forum.xojo.com/garrypettet/32/31_2.png) [@GarryPettet](https://forum.xojo.com/u/GarryPettet)\
**Post date:** [February 2, 2022, 10:28pm UTC](https://forum.xojo.com/t/generatejson-expanded-property-broken/68310/1 "2022-02-02T22:28:15Z")

</div>

According to the [docs](https://documentation.xojo.com/api/text/json/generatejson.html), `GenerateJSON()` takes an optional property `expanded` (that defaults to `False`) that includes whitespace to make the string more human-readable (closed in Feedback case 37033).

However, this doesn’t work for me. I always get back compact JSON.

I see @Thom_McGrath was [banging his head](https://forum.xojo.com/t/what-could-cause-xojo-generatejson-not-to-generate-expanded-json/66876/10) against a brick wall with this bug back in November but got no response from Xojo engineers.

Is this a regression? I’m running Xojo 2021 r3.1 on an M1 MBP.

---

<div class="post-metadata">

**Author:** ![Thom\_McGrath](https://forum.xojo.com/user_avatar/forum.xojo.com/thom_mcgrath/32/192_2.png) [@Thom\_McGrath](https://forum.xojo.com/u/Thom_McGrath)\
**Post date:** [February 2, 2022, 10:39pm UTC](https://forum.xojo.com/t/generatejson-expanded-property-broken/68310/2 "2022-02-02T22:39:35Z")

</div>

I don’t know if it’d be classified as a regression if it never worked on ARM Macs. But it is concerning that Xojo has made no progress on the issue.

---

<div class="post-metadata">

**Author:** ![GarryPettet](https://forum.xojo.com/user_avatar/forum.xojo.com/garrypettet/32/31_2.png) [@GarryPettet](https://forum.xojo.com/u/GarryPettet)\
**Post date:** [February 2, 2022, 10:40pm UTC](https://forum.xojo.com/t/generatejson-expanded-property-broken/68310/3 "2022-02-02T22:40:46Z")

</div>

Did you ever open another Feedback case for it?

---

<div class="post-metadata">

**Author:** ![Thom\_McGrath](https://forum.xojo.com/user_avatar/forum.xojo.com/thom_mcgrath/32/192_2.png) [@Thom\_McGrath](https://forum.xojo.com/u/Thom_McGrath)\
**Post date:** [February 2, 2022, 10:42pm UTC](https://forum.xojo.com/t/generatejson-expanded-property-broken/68310/4 "2022-02-02T22:42:02Z")

</div>

The bug is \<[https://xojo.com/issue/66705](https://xojo.com/issue/66705)\>

---

<div class="post-metadata">

**Author:** ![GarryPettet](https://forum.xojo.com/user_avatar/forum.xojo.com/garrypettet/32/31_2.png) [@GarryPettet](https://forum.xojo.com/u/GarryPettet)\
**Post date:** [February 2, 2022, 10:45pm UTC](https://forum.xojo.com/t/generatejson-expanded-property-broken/68310/5 "2022-02-02T22:45:27Z")

</div>

Thanks. I’ve just stuck 75 points onto the case. Who knows if it’ll make a difference as it’s already a verified bug 🤷‍♂️

---

<div class="post-metadata">

**Author:** ![Tim\_Parnell](https://forum.xojo.com/user_avatar/forum.xojo.com/tim_parnell/32/161_2.png) [@Tim\_Parnell](https://forum.xojo.com/u/Tim_Parnell)\
**Post date:** [February 2, 2022, 10:55pm UTC](https://forum.xojo.com/t/generatejson-expanded-property-broken/68310/6 "2022-02-02T22:55:15Z")

</div>

It did work in 2020r1.1. When I updated to 2021r3.1 is when I found it had stopped working. I think it happened at the same time they removed the default UTF8 encoding.

---

<div class="post-metadata">

**Author:** ![Thom\_McGrath](https://forum.xojo.com/user_avatar/forum.xojo.com/thom_mcgrath/32/192_2.png) [@Thom\_McGrath](https://forum.xojo.com/u/Thom_McGrath)\
**Post date:** [February 2, 2022, 11:13pm UTC](https://forum.xojo.com/t/generatejson-expanded-property-broken/68310/7 "2022-02-02T23:13:34Z")

</div>

The “best” workaround I’ve been able to come up with is using MBS to parse and regenerate the JSON. It does this very fast, so it’s not much of a performance hit. But the JSON it generates can be a bit weird, so I want to avoid it.

---

<div class="post-metadata">

**Author:** ![Tim\_Parnell](https://forum.xojo.com/user_avatar/forum.xojo.com/tim_parnell/32/161_2.png) [@Tim\_Parnell](https://forum.xojo.com/u/Tim_Parnell)\
**Post date:** [February 2, 2022, 11:24pm UTC](https://forum.xojo.com/t/generatejson-expanded-property-broken/68310/8 "2022-02-02T23:24:50Z")

</div>

I was planning to do the same thing with Einhugur to resolve Apple’s no-more-python warning.

---

<div class="post-metadata">

**Author:** ![Thom\_McGrath](https://forum.xojo.com/user_avatar/forum.xojo.com/thom_mcgrath/32/192_2.png) [@Thom\_McGrath](https://forum.xojo.com/u/Thom_McGrath)\
**Post date:** [February 3, 2022, 6:04pm UTC](https://forum.xojo.com/t/generatejson-expanded-property-broken/68310/9 "2022-02-03T18:04:42Z")

</div>

Is anything going to happen with this one @Greg_O_Lone?

---

<div class="post-metadata">

**Author:** ![Dana\_Brown](https://forum.xojo.com/user_avatar/forum.xojo.com/dana_brown/32/15210_2.png) [@Dana\_Brown](https://forum.xojo.com/u/Dana_Brown)\
**Post date:** [February 3, 2022, 6:22pm UTC](https://forum.xojo.com/t/generatejson-expanded-property-broken/68310/10 "2022-02-03T18:22:51Z")

</div>

The case is marked as Fixed for the next release.

---

<div class="post-metadata">

**Author:** ![Thom\_McGrath](https://forum.xojo.com/user_avatar/forum.xojo.com/thom_mcgrath/32/192_2.png) [@Thom\_McGrath](https://forum.xojo.com/u/Thom_McGrath)\
**Post date:** [February 3, 2022, 6:35pm UTC](https://forum.xojo.com/t/generatejson-expanded-property-broken/68310/11 "2022-02-03T18:35:02Z")

</div>

Wow… just half an hour before my post. I suppose I should have checked first. But I also would have expected to get an email from Feedback. Guess that’s broken again.

---

<div class="post-metadata">

**Author:** ![anon20074439](https://forum.xojo.com/letter_avatar_proxy/v4/letter/a/ac8455/32.png) [@anon20074439](https://forum.xojo.com/u/anon20074439)\
**Post date:** [February 3, 2022, 6:49pm UTC](https://forum.xojo.com/t/generatejson-expanded-property-broken/68310/12 "2022-02-03T18:49:39Z")

</div>

AFAIK they only send out emails when its verified as shipped because something might come up that means it cant make it into the release and they don’t want to get peoples hopes up. I think it was mentioned the other day somewhere.
