简体   繁体   English

为什么提交到 OData Edm.Decimal 类型时会出错?

[英]Why do I get an error when submitting to OData Edm.Decimal type?

I'm trying to submit some JSON to an OData service.我正在尝试将一些 JSON 提交给 OData 服务。 According to the $metadata, it expects this type:根据 $metadata,它需要这种类型:

<Property Name="curClaimValue" Type="Edm.Decimal" Nullable="true" Precision="19" Scale="4"/>

This is part of my JSON:这是我的 JSON 的一部分:

..."curClaimValue":654321... ...“curClaimValue”:654321 ...

And this is the error message:这是错误消息:

Error processing request stream.错误处理请求 stream。 Error encountered in converting the value from request payload for property 'curClaimValue' to type 'Decimal', which is the property's expected type.将属性“curClaimValue”的请求负载中的值转换为类型“十进制”时遇到错误,这是该属性的预期类型。

Let me know if you need more information.如果您需要更多信息,请与我们联系。

Thanks, Stephen谢谢,斯蒂芬

Seems I have to wrap the number in quotes.似乎我必须将数字用引号括起来。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 使用Edm.Time类型的oData模型的PUT方法 - PUT method to oData model with Edm.Time type 为什么在我输入文本框时字符会从文本框中删除? - Why do characters get removed from a textbox when I type into it? 为什么在调用有效函数时出现类型错误? | 角度2 - Why do I get a Type Error when calling a valid function? | Angular 2 为什么我在将 Wasm 捆绑在一起后收到错误“响应具有不受支持的 MIME 类型”,但在使用 webpack 开发服务器时却没有? - Why do I get the error "Response has unsupported MIME type" after bundling Wasm together, but not when serving with the webpack dev server? 为什么在安装 NestJS 客户端时会出现此错误? - Why do I get this error when installing the NestJS Client? 为什么我在尝试 POST 请求(表单)时会出错? - Why do i get error when trying to POST request (form)? Javascript 转换为 OData 的 EDM 日期 - Javascript Convert to EDM Date for OData 为什么在创建 function 时会出现错误,但在创建变量时却不会? - Why do I get an error when create a function but not when a variable? 当我在获得输入类型的函数中输入{}时,为什么我会得到未定义的 - why do i get undefined when i input {} in side a function that get the type of input 为什么选择初始加载页面时出现错误? - Why do I get an error when choosing the initial loading page?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM