Avoid escaping slashes in JSON output - #2205
Merged
Merged
Conversation
jglogan
self-requested a review
August 28, 2026 20:42
Contributor
|
@taljeon I'm going to let this build completely before approving but it looks like it should be fine to merge. One thing I noticed when I searched our commands is that MachineInspect doesn't offer a format option or use the shared output code. Feel free to create an issue and PR for that if you like and that should be an easy review and merge as well. Edit: actually it looks like all our |
Code Coverage
|
jglogan
approved these changes
Aug 28, 2026
Contributor
|
@taljeon Thanks for taking care of this! Merged. |
5 tasks
6 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Type of Change
Motivation and Context
Fixes #2204.
Swift's default
JSONEncoderoutput escapes forward slashes, which makes CLI JSON paths and URLs harder to read and copy. This change makes the shared CLI JSON renderer always use.withoutEscapingSlashesand routesmachine list --format jsonthrough that renderer while preserving its ISO-8601 date encoding.OpenAI Codex assisted with investigation, implementation, and verification. The final change is limited to JSON rendering behavior and focused regression coverage.
Testing
Tested locally
Added/updated tests
Added/updated docs
swift test --filter RenderJSONTests— 7 tests passedswift test --filter ContainerCommandsTests— 30 tests passedmake test— 763 tests passedstrict
swift format lintpassed for all changed files