JSON deserializer errors don't render properly when an unexpected object is encountered #18876

Closed
opened 2026-01-31 06:26:56 +00:00 by claunia · 2 comments
Owner

Originally created by @DHowett on GitHub (Nov 12, 2022).

Originally assigned to: @DHowett on GitHub.

If you have this in a profile...

"colorScheme": {}

you get a weird error message:

image

It's happening because we try to format the JSON object for display in the error message using asString, but Objects cannot be rendered via asString.

I swear this used to work (and say something like unexpected: object), but I can't figure out why it regressed.

Originally created by @DHowett on GitHub (Nov 12, 2022). Originally assigned to: @DHowett on GitHub. If you have this in a profile... ```json "colorScheme": {} ``` you get a weird error message: <img width="392" alt="image" src="https://user-images.githubusercontent.com/189190/201446111-1a8cf555-3970-4c20-842f-719fdd385afb.png"> It's happening because we try to format the JSON object for display in the error message using `asString`, but Objects cannot be rendered via `asString`. I swear this used to work (and say something like `unexpected: object`), but I can't figure out why it regressed.
Author
Owner

@ghost commented on GitHub (Jan 24, 2023):

:tada:This issue was addressed in #14668, which has now been successfully released as Windows Terminal v1.16.1023 (10231 and 10232).🎉

Handy links:

@ghost commented on GitHub (Jan 24, 2023): :tada:This issue was addressed in #14668, which has now been successfully released as `Windows Terminal v1.16.1023 (10231 and 10232)`.:tada: Handy links: * [Release Notes](https://github.com/microsoft/terminal/releases/tag/v1.16.1023 (10231 and 10232)) * [Store Download](https://www.microsoft.com/store/apps/9n8g5rfz9xk3?cid=storebadge&ocid=badge)
Author
Owner

@ghost commented on GitHub (Jan 24, 2023):

:tada:This issue was addressed in #14668, which has now been successfully released as Windows Terminal Preview v1.17.1023.🎉

Handy links:

@ghost commented on GitHub (Jan 24, 2023): :tada:This issue was addressed in #14668, which has now been successfully released as `Windows Terminal Preview v1.17.1023`.:tada: Handy links: * [Release Notes](https://github.com/microsoft/terminal/releases/tag/v1.17.1023) * [Store Download](https://www.microsoft.com/store/apps/9n8g5rfz9xk3?cid=storebadge&ocid=badge)
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#18876