A user just asked:
I need to pass my array to a webserver. But somehow, the array passed with cfhttp throws an error. Please help
You can not pass a structure or an array in a URL as they are complex values and Coldfusion does not have a way to convert them to simple string values (this is what you need to pass in a URL).
The only way to pass complex values is to serialize the Coldfusion struct or array for the URL. Fortunately, Coldfusion has a built in function called “SerializeJSON” to create a simple string. On the other hand, you can convert the simple string back to a struct or array with “DeserializeJSON”.
Here is a simple example how to pass a 2 dimensional array with cfhttp:
[code]]czozNTc6XCI8Y2ZzZXQgbXlhciA9IGFycmF5bmV3KDIpPg0KPGNmc2V0IG15YXJbMV1bMV0gPSBcImtleXdvcmRzXCI+DQo8Y2ZzZXQgbXtbJiomXX15YXJbMV1bMl0gPSBcIlJhenVuYSwgV29yZHByZXNzLCBUb21jYXRcIj4NCjxjZnNldCBteWFyWzJdWzFdID0gXCJkZXNjcmlwdGlvblwiPntbJiomXX0NCjxjZnNldCBteWFyWzJdWzJdID0gXCJSYXp1bmEgaXMgYSBkYW0gd2l0aCBhIGxvdCBvZiBmZWF0dXJlc1wiPg0KDQo8Y2ZzZXQgdGh7WyYqJl19ZWpzb24gPSBTZXJpYWxpemVKU09OKG15YXIpPg0KDQo8Y2ZodHRwIHVybD1cImZ1bmN0aW9uLmNmY1wiPg0KICAgICAgPGNmaHR0cHBhe1smKiZdfXJhbSBuYW1lPVwianNvbmRhdGFcIiB0eXBlPVwiVVJMXCIgdmFsdWU9XCIjdGhlanNvbiNcIj4NCjwvY2ZodHRwPlwiO3tbJiomXX0=[[/code]