OpenRasta 数组绑定的有线格式(urlencoded 和 multipart/formdata)

发布于 2024-12-29 17:07:29 字数 286 浏览 3 评论 0原文

OpenRasta 中绑定数组和字典的线路格式似乎是“:index”,如下所示:

class X
{
  public int[] Data { get; set; }
}

序列化为(具有两个数组项 5 和 12):

Data:0=5&Data:1=12

是否可以将此格式更改为:

Data[0]=5&Data[1]=12

谢谢,Jørn

The wire format for binding arrays and dictionaries in OpenRasta seems to be ":index" like this:

class X
{
  public int[] Data { get; set; }
}

which serializes to (with two array items 5 and 12):

Data:0=5&Data:1=12

Is it possible to change this format to:

Data[0]=5&Data[1]=12

Thanks, Jørn

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

怪我鬧 2025-01-05 17:07:29

您可以尝试将 IPathManager 替换为支持该格式的自定义 IPathManager。或者,也可以随意添加对该格式的支持并向 openrasta-core 发送拉取请求。

You can try and replace the IPathManager with a custom one that supports that format. Alternatively, feel free to add support for that format too and send a pull request to openrasta-core.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文