I have build a robot which extracts data from a crypto exchange via API.
I used an HTTP request which returns a string. This string is converted to an object via a Deserialize Json-activity. After that I have a Do While activity in which every row of the object is added to a DataTable. Therefore I used an Assign in which a array for each row is filled with 5 strings (sequence, price, size, side and time). This works most of the time well but sometimes I get an error at the point of assigning the array: Object reference not set to an instance of an object.
the array: {objJsonObject(“data”)(intRowCounter)(“sequence”).ToString,objJsonObject(“data”)(intRowCounter)(“price”).ToString,objJsonObject(“data”)(intRowCounter)(“size”).ToString,objJsonObject(“data”)(intRowCounter)(“side”).ToString,objJsonObject(“data”)(intRowCounter)(“time”).ToString}
objectJsonObject is the Object-variable
intRowCounter is an int32 in which the current row number is stored
sequence, price, size, side and time are the strings and columns of the DataTable.
What is going wrong at that moment and can I see it somewhere? Is there a way to avoid this?
Many thanks in advance!