An unexpected 'primitivevalue' node was found when reading from the json reader. A 'startarray' node was expected
Answers
Answered by
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