--- source: crates/rome_formatter_test/src/snapshot_builder.rs info: test_file: json/with-comment/top-block-comment.json --- # Input ```json /* comment */{ "foo": "bar" } ``` # Prettier differences ```diff --- Prettier +++ Rome @@ -1,3 +1,3 @@ -/* comment */ { +/* comment */{ "foo": "bar" } ``` # Output ```json /* comment */{ "foo": "bar" } ``` # Errors ``` top-block-comment.json:1:1 parse ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ × JSON standard does not allow comments. > 1 │ /* comment */{ │ ^^^^^^^^^^^^^ 2 │ "foo": "bar" 3 │ } top-block-comment.json:1:14 parse ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ × End of file expected > 1 │ /* comment */{ │ ^ > 2 │ "foo": "bar" > 3 │ } │ ^ 4 │ i Use an array for a sequence of values: `[1, 2]` ```