I'm trying to create a new list item in a SharePoint document library, but I have an error when I set a value in a multi-choice field.
This is the body of the post request:
{
"listItemCreateInfo": {
"FolderPath": {
"DecodedUrl": "......."
},
"UnderlyingObjectType": 1
},
"formValues": [
{
"FieldName": "MultiChoice",
"FieldValue": [
"Scelta n. 1",
"Scelta n. 3"
],
},
{
"FieldName": "FileLeafRef",
"FieldValue": "2021-000001010"
},
{
"FieldName": "ContentTypeId",
"FieldValue": "0x0120D5200062FEFD4873814585B3EFD57010F1F8AE"
}
],
"bNewDocumentUpdate": false
}
And this is the error:
An unexpected 'StartObject' node was found when reading from the JSON reader. A 'PrimitiveValue' node was expected
I tried the following solutions:
"FieldValue": [
"Scelta n. 1",
"Scelta n. 3"
],
"FieldValue": "{'results':[
'Scelta n. 1',
'Scelta n. 3'
]}",
but they all failed.
How should I create the JSON?