I have a json schema for my queue, which matches up to a json file. I want to raise a queue item using the API and include this detail direct from the file. However, I am running into issues with the queue item parameters must not be null error (400). I am providing all the schema fields and other itemdata as I normally do for this call elsewhere.
I am reading my json into a text string using a read text file activity, and then creating my payload string using this assign:
Inside response I have a valid json, so strings are surrounded by " not “”.
I am reading repsonse into a string variable from the json file and incorporating it within an assign to create the variable payload to send in the call.
Using swagger I am able to create queue items where “data” is or [response], even though these do not match the schema, but cannot send the json inside the . The same is true even when I change the quotes inside the response json from " to “”.
Or if we can’t actually format the specificcontent properly! I can’t use objects or arrays without it throwing an error, so we can only use strings, numbers and booleans? That’s very limiting.
Ideally in queue yes we are limited to use strings,numbers and booleans any other datatype are not supported.
But there are alternate ways to add them…for example if you want to add an array you can concatenate the values using any special character and then when retrieved can split on that can get the array back
same can be done with dictionary or a datatable as well…The idea is to convert or serialize them as strings and add them and later again split or deserialize them to the required object
Yeah, I hope I can deserialise the json and add each as a seperate field, combinging arrays into strings is managable and reasonably readable, but I have big dictionary objects as well which I’d sooner have srate than in a conbined string value. Is there any way to add headers to sections of specific data, or have multiple sets of data?
At the moment, my best idea is to rename the fields to “header/field”:“value” rather than “header”:“field/value/field/value/field/value”