Skip to main content

format_jsonc

Function format_jsonc 

Source
pub fn format_jsonc(input: &str) -> String
Expand description

Formats JSONC (JSON with // or /* */ comments and trailing commas) matching Prettier 3.7.4 (tabWidth: 2, LF).

§Arguments

  • &str - Raw JSONC source text.

§Returns

  • String - Formatted JSONC preserving comments and trailing commas cleanly.