Search code examples
openrasta

Wire format for OpenRasta array bindings (urlencoded and multipart/formdata)


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


Solution

  • 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.