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

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

📋 Pull Request Information

Original PR: https://github.com/microsoft/terminal/pull/1005
Author: @zadjii-msft
Created: 5/24/2019
Status: Merged
Merged: 6/4/2019
Merged by: @zadjii-msft

Base: masterHead: dev/migrie/f/jsoncpp


📝 Commits (10+)

  • d0121a1 start work on an error dialog
  • effefeb Continue work on an error dialog
  • 00a8da4 This unfortunately didn't work
  • 643a177 Merge remote-tracking branch 'origin/master' into dev/migrie/f/gh-error-dialog
  • b51d03f I'm just committing all of this, even though I really don't need most of it.
  • c1d17f6 Cleanup for PR
  • cb55215 Merge remote-tracking branch 'origin/master' into dev/migrie/f/gh-error-dialog
  • 809a180 Include jsoncpp in the solution
  • e8f5fb8 Merge branch 'master' into dev/migrie/f/gh-error-dialog
  • 5547ca5 PR feedback

📊 Changes

25 files changed (+8682 additions, -638 deletions)

View changed files

NOTICE.md (+49 -0)
dep/jsoncpp/README.md (+7 -0)
dep/jsoncpp/json/json-forwards.h (+333 -0)
dep/jsoncpp/json/json.h (+2207 -0)
dep/jsoncpp/jsoncpp.cpp (+5386 -0)
📝 src/cascadia/TerminalApp/App.h (+0 -1)
📝 src/cascadia/TerminalApp/AppKeyBindings.cpp (+20 -210)
📝 src/cascadia/TerminalApp/AppKeyBindings.h (+3 -5)
📝 src/cascadia/TerminalApp/AppKeyBindings.idl (+0 -3)
src/cascadia/TerminalApp/AppKeyBindingsSerialization.cpp (+211 -0)
src/cascadia/TerminalApp/AppKeyBindingsSerialization.h (+28 -0)
📝 src/cascadia/TerminalApp/CascadiaSettings.h (+6 -6)
📝 src/cascadia/TerminalApp/CascadiaSettingsSerialization.cpp (+91 -77)
📝 src/cascadia/TerminalApp/ColorScheme.cpp (+46 -56)
📝 src/cascadia/TerminalApp/ColorScheme.h (+2 -3)
📝 src/cascadia/TerminalApp/GlobalAppSettings.cpp (+50 -55)
📝 src/cascadia/TerminalApp/GlobalAppSettings.h (+2 -2)
📝 src/cascadia/TerminalApp/Profile.cpp (+154 -201)
📝 src/cascadia/TerminalApp/Profile.h (+4 -4)
📝 src/cascadia/TerminalApp/TerminalApp.vcxproj (+15 -0)

...and 5 more files

📄 Description

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.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/microsoft/terminal/pull/1005 **Author:** [@zadjii-msft](https://github.com/zadjii-msft) **Created:** 5/24/2019 **Status:** ✅ Merged **Merged:** 6/4/2019 **Merged by:** [@zadjii-msft](https://github.com/zadjii-msft) **Base:** `master` ← **Head:** `dev/migrie/f/jsoncpp` --- ### 📝 Commits (10+) - [`d0121a1`](https://github.com/microsoft/terminal/commit/d0121a10f4b238db28df7c7d76ced8cf37accef8) start work on an error dialog - [`effefeb`](https://github.com/microsoft/terminal/commit/effefeb95918abfc5775fad46dbb183227a22bd9) Continue work on an error dialog - [`00a8da4`](https://github.com/microsoft/terminal/commit/00a8da4045769f057ea32e64c06fc837e9070496) This unfortunately didn't work - [`643a177`](https://github.com/microsoft/terminal/commit/643a17798ca3dab5c9d86a48b7032b4d38306e10) Merge remote-tracking branch 'origin/master' into dev/migrie/f/gh-error-dialog - [`b51d03f`](https://github.com/microsoft/terminal/commit/b51d03fa664d223db0ff76a23eba612324585977) I'm just committing all of this, even though I really don't need most of it. - [`c1d17f6`](https://github.com/microsoft/terminal/commit/c1d17f69103c9c022dcb32eb9097983f2501d068) Cleanup for PR - [`cb55215`](https://github.com/microsoft/terminal/commit/cb55215372987295e16e9bc0842bbe8a6c7c6bd3) Merge remote-tracking branch 'origin/master' into dev/migrie/f/gh-error-dialog - [`809a180`](https://github.com/microsoft/terminal/commit/809a180e7e9692b0f19cef4318b96cfe921e84de) Include jsoncpp in the solution - [`e8f5fb8`](https://github.com/microsoft/terminal/commit/e8f5fb8f97311a6ed56837a82099c9ebd81e1956) Merge branch 'master' into dev/migrie/f/gh-error-dialog - [`5547ca5`](https://github.com/microsoft/terminal/commit/5547ca56efeaa74b0b71176dd39cf408b53831a2) PR feedback ### 📊 Changes **25 files changed** (+8682 additions, -638 deletions) <details> <summary>View changed files</summary> ➕ `NOTICE.md` (+49 -0) ➕ `dep/jsoncpp/README.md` (+7 -0) ➕ `dep/jsoncpp/json/json-forwards.h` (+333 -0) ➕ `dep/jsoncpp/json/json.h` (+2207 -0) ➕ `dep/jsoncpp/jsoncpp.cpp` (+5386 -0) 📝 `src/cascadia/TerminalApp/App.h` (+0 -1) 📝 `src/cascadia/TerminalApp/AppKeyBindings.cpp` (+20 -210) 📝 `src/cascadia/TerminalApp/AppKeyBindings.h` (+3 -5) 📝 `src/cascadia/TerminalApp/AppKeyBindings.idl` (+0 -3) ➕ `src/cascadia/TerminalApp/AppKeyBindingsSerialization.cpp` (+211 -0) ➕ `src/cascadia/TerminalApp/AppKeyBindingsSerialization.h` (+28 -0) 📝 `src/cascadia/TerminalApp/CascadiaSettings.h` (+6 -6) 📝 `src/cascadia/TerminalApp/CascadiaSettingsSerialization.cpp` (+91 -77) 📝 `src/cascadia/TerminalApp/ColorScheme.cpp` (+46 -56) 📝 `src/cascadia/TerminalApp/ColorScheme.h` (+2 -3) 📝 `src/cascadia/TerminalApp/GlobalAppSettings.cpp` (+50 -55) 📝 `src/cascadia/TerminalApp/GlobalAppSettings.h` (+2 -2) 📝 `src/cascadia/TerminalApp/Profile.cpp` (+154 -201) 📝 `src/cascadia/TerminalApp/Profile.h` (+4 -4) 📝 `src/cascadia/TerminalApp/TerminalApp.vcxproj` (+15 -0) _...and 5 more files_ </details> ### 📄 Description <!-- 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. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
claunia added the pull-request label 2026-01-31 09:03:16 +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#24428