Skip to content

Preserve JSON Key Order for Better Dotfile Management #816

@dotWee

Description

@dotWee

OS

macOS 15.0.1 (Build 24A348)

LinearMouse

latest

Is your feature request related to a problem?

I've encountered a small issue that makes it a bit tricky to manage the application's configuration file, especially when using utilities to backup and manage dotfiles (e.g., Git).

Currently, LinearMouse saves its configuration as a JSON, but it appears that the JSON keys are written in a random or non-deterministic order.

This creates a challenge when tracking changes via version control systems like Git because every time the file is updated, the key order changes, even when the actual settings haven't been modified.
This makes it difficult to compare diffs and manage backups effectively.

Describe the solution you'd like

Add .sortedKeys to the encoder.outputFormatting property.

Describe alternatives you've considered

No response

Additional context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions