[PR #1005] Switch to jsoncpp as our json library #24433

Open
opened 2026-01-31 09:03:17 +00:00 by claunia · 0 comments
Owner

Original Pull Request: https://github.com/microsoft/terminal/pull/1005

State: closed
Merged: Yes


Summary of the Pull Request

Switch to using jsoncpp as our json library. This lets us pretty-print the json file by default, and lets users place comments in the json file.

PR Checklist

  • Closes `GetConsoleAliases` Unable to get complete data (#475)
  • CLA signed. If not, go over here and sign the CLA
  • Tests added/passed - this would really be a good opportunity to add some tests Yea this is gonna be a follow-up, see #1042
  • Requires documentation to be updated - @cinnamon-msft it's now a race between this PR and yours to see who needs to update the documentation.
  • I've discussed this with @DHowett-MSFT extensively this week

Detailed Description of the Pull Request / Additional comments

We will now only re-write the file when the actual logical structure of the json object changes, not only when the serialization changes.

Unfortunately, this will remove any existing ordering of profiles, and make the order random. We don't terribly care though, because when #754 lands, this will be less painful.

It also introduces a top-level globals object to hold all the global properties, including keybindings. Existing profiles should gracefully upgrade.

**Original Pull Request:** https://github.com/microsoft/terminal/pull/1005 **State:** closed **Merged:** Yes --- <!-- Enter a brief description/summary of your PR here. What does it fix/what does it change/how was it tested (even manually, if necessary)? --> ## Summary of the Pull Request Switch to using jsoncpp as our json library. This lets us pretty-print the json file by default, and lets users place comments in the json file. <!-- Please review the items on the PR checklist before submitting--> ## PR Checklist * [x] Closes #475 * [x] CLA signed. If not, go over [here](https://cla.opensource.microsoft.com/microsoft/Terminal) and sign the CLA * [x] Tests added/passed - ~~this would really be a good opportunity to add some tests~~ Yea this is gonna be a follow-up, see #1042 * [ ] Requires documentation to be updated - @cinnamon-msft it's now a race between this PR and yours to see who needs to update the documentation. * [x] I've discussed this with @DHowett-MSFT extensively this week <!-- Provide a more detailed description of the PR, other things fixed or any additional comments/features here --> ## Detailed Description of the Pull Request / Additional comments We will now only re-write the file when the actual logical structure of the json object changes, not only when the serialization changes. Unfortunately, this will remove any existing ordering of profiles, and make the order random. We don't terribly care though, because when #754 lands, this will be less painful. It also introduces a top-level `globals` object to hold all the global properties, _including_ `keybindings`. Existing profiles should gracefully upgrade.
claunia added the pull-request label 2026-01-31 09:03:17 +00:00
Sign in to join this conversation.
No Label pull-request
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#24433