Computer Science, asked by sreyanshu3353, 1 year ago

An unexpected 'primitivevalue' node was found when reading from the json reader. A 'startarray' node was expected

Answers

Answered by liza10987654321
0

As stated in the error, you should POST a JSON object, not an array.

I believe the change you need is to change:

toJSON(): any[] {

let json = [];

json[0] = {

//...

to

toJSON(): any[] {

let json = {

//...

Similar questions