I’ve implemnted a javascript application that is using the oDataDispatcher in a delphi server to access a DataTable.
The read looks fine and i get my data but when i try to update a record i get an “invalid json payload” exception.
I’ve set the method for update to PUT.
At the moment i don’t know what format the oData expects;
I would like to know what the oData expects when the data comes back(ex. does it want all the fields, or the primary key, or the structure that i pulled at the begining? )
I tried sending the data in this format and it’s getting into another problem.
at:
for i := 0 to lNewFields.Count -1 do begin
n := lNewFields.IndexOf(aRec^.lQuery.Keys.Names[i]);
The keys array is empty.
The JSON i send in the “d” property looks like this: