Unexpected character sequence in member name in json document

I have a json document that looks something like this:

[
{
attr11:"value11",
attr12:"value12"
},
{
attr21:"value21",
attr22:"value22"
},
{
attr31:"value31",
attr32:"value32"
}
]

Visual Studio underlines the first letters of attrN and says "an unexpected sequence of characters in the member name." What is it?

+4
source share
1 answer

Visual Studio does not like member names that are not enclosed in quotation marks. Just enclose them in quotation marks: {"attr11": "value11", "attr12": "value12"},

0
source

Source: https://habr.com/ru/post/1677762/