DataTables 1.10 - Change needed ?
DataTables 1.10 - Change needed ?
Hi there,
Thank you for the great job you did with DataTables 1.10 ! It is now really easier to use and to understand.
I have a question regarding data sent to the server when using server side processing. You included in the url "[" and "]" characters that break the simplicity of serializing and deserializing parameters.
I'm using .NET to treat those requests and such characters are not allowed in variable names.
Why did you do that and do you think it could be possible to rollback this ?
Thank you.
Aleks
Thank you for the great job you did with DataTables 1.10 ! It is now really easier to use and to understand.
I have a question regarding data sent to the server when using server side processing. You included in the url "[" and "]" characters that break the simplicity of serializing and deserializing parameters.
I'm using .NET to treat those requests and such characters are not allowed in variable names.
Why did you do that and do you think it could be possible to rollback this ?
Thank you.
Aleks
This discussion has been closed.
Replies
Can .NET really not use url encoded array syntax?!
It is done that way because most scripting languages will automatically parse such information into arrays - which that data is, so it makes sense to have it as such.
Allan
Allan
The problem is not the array. "myarray=[1,2,3]" can be parsed by .NET.
But "column[0].something" is not possible by default because .NET will try to match with a class property and "[" is not allowed in variable name.
I was able to make it work with http://msdn.microsoft.com/en-us/library/system.runtime.serialization.datamemberattribute.name(v=vs.110).aspx
My feedback was just about the fact it don't seems natural to have those strings :)
Thank you !
[code]
var myArray = [ 1, 2, 3 ];
[/code]
when submitted gives you:
[code]
myArray[] = 1;
myArray[] = 2;
myArray[] = 3;
[/code]
Most scripting languages will parse that as an array at the server, but the jQuery `traditional` Ajax option I believe is provided to provide a different way of serialising the data, presumably for .NET.
Allan