try to send data to my database by web service an get this error:
Primitive values of type \'Edm.Decimal\' and \'Edm.Int64\' must be quoted in the payload. M
At least one of your properties has a declared type of Edm.Decimal
or Edm.Int64
. These values must be serialized as a string (i.e., the number wrapped in "
characters) in OData's JSON format. If you're not sure what the declared types of the properties are, you can look up the entity type in the server's $metadata
document (typically available at http://.../MyService.svc/$metadata
).
So, for the property or properties that are Edm.Int64
or Edm.Decimal
, you could remove the call to parseFloat()
and just keep it as a string.