JamieMason/syncpack

feat(fs): preserve original formatting in Rust implementation

Open

#256 建立於 2025年1月13日

在 GitHub 查看
 (3 留言) (0 反應) (0 負責人)Rust (72 fork)github user discovery
Type: Feathelp wanted

倉庫指標

Star
 (2,056 star)
PR 合併指標
 (30 天內沒有已合併 PR)

描述

From #197

One thing I'm missing in the Rust implementation is #241 is regressed and I can't find anything in Rust that maintains the original formatting of the parsed in JSON file

@JamieMason

I'm still curious about the format-preservation regression -- to avoid mixing two discussions in this thread, do you want to make a separate issue to track that one? Or maybe there already is one?

@tylerd-canva

The gist of it is that I can't find a library in Rust which will parse JSON, let you modify that JSON in memory, and then write it back to disk while preserving the original indentation etc of the original file. In TypeScript I used jsonc-parser but I've not been able to find an equivalent in Rust.

貢獻者指南