--- source: crates/biome_formatter_test/src/snapshot_builder.rs info: json/range/cross-object-2.json --- # Input ```json {a: { "b": 2, "c": 3, d: {d:4}, }, c: {d: 6} } ``` # Prettier differences ```diff --- Prettier +++ Biome @@ -1 +1,5 @@ -{ "a": { "b": 2, "c": 3, "d": { "d": 4 } }, "c": { "d": 6 } } +{a: +{ "b": 2, "c": 3, +d: {d:4}, }, +c: {d: 6} +} ``` # Output ```json {a: { "b": 2, "c": 3, d: {d:4}, }, c: {d: 6} } ``` # Errors ``` cross-object-2.json:1:2 parse ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ × Property key must be double quoted > 1 │ {a: │ ^ 2 │ { "b": 2, "c": 3, 3 │ d: {d:4}, }, cross-object-2.json:3:1 parse ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ × Property key must be double quoted 1 │ {a: 2 │ { "b": 2, "c": 3, > 3 │ d: {d:4}, }, │ ^ 4 │ c: {d: 6} 5 │ } cross-object-2.json:3:5 parse ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ × Property key must be double quoted 1 │ {a: 2 │ { "b": 2, "c": 3, > 3 │ d: {d:4}, }, │ ^ 4 │ c: {d: 6} 5 │ } cross-object-2.json:3:11 parse ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ × Expected a property but instead found '}'. 1 │ {a: 2 │ { "b": 2, "c": 3, > 3 │ d: {d:4}, }, │ ^ 4 │ c: {d: 6} 5 │ } i Expected a property here. 1 │ {a: 2 │ { "b": 2, "c": 3, > 3 │ d: {d:4}, }, │ ^ 4 │ c: {d: 6} 5 │ } cross-object-2.json:4:1 parse ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ × Property key must be double quoted 2 │ { "b": 2, "c": 3, 3 │ d: {d:4}, }, > 4 │ c: {d: 6} │ ^ 5 │ } 6 │ cross-object-2.json:4:5 parse ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ × Property key must be double quoted 2 │ { "b": 2, "c": 3, 3 │ d: {d:4}, }, > 4 │ c: {d: 6} │ ^ 5 │ } 6 │ ```