githubmarkdown

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": "" } ... }
```

Solution

  • 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": "" } ... ]
    ```