amimaro
amimaro

Reputation: 303

Github markdown { symbol with red background

Why the second symbol "{" on my repository README.md have a red background?

The code used was

## Example output - latest:
```json
{ { "term": "", "when": "" } ... }
```

Upvotes: 0

Views: 2520

Answers (1)

andrewgu
andrewgu

Reputation: 1642

Your JSON format is incorrect. The outer object does not have a key to label the value which is the inner object.

Github uses the red background to show that there is a problem in your syntax, which in this case is that the structure of your JSON object is invalid.

Try using something like:

```json
{ "key": { "term": "", "when": "" } ... }
```

If you were trying to represent an array of objects, use something along these lines:

```json
[ { "term": "", "when": "" } ... ]
```

Upvotes: 2

Related Questions