Orchestrator HTTPS Request - For Each/Deserialize/JObject - Object reference not set to an instance of an object

Hello Together,
I have a for each of a JObject(“value”). When retrieving data it works for Item(“Message”) and Item(“TimeStamp”).

But for all of the other datapoints in the JObject (e.g., logType, processName), I get the error message “Object reference not set to an instance of an object”. Any ideas?

Thank you!

EDIT: JSON data came from Orchestrator Https Request: The parameters were in the raw message, which is why they were not found

image

1/ Try debugging

2/ Names of JSON propperties are case sensitive. Check that you use correct character case.

Cheers

Hi @PeCour

Try to debug, put a breakpoint at the value and check what type of value you are getting when you type currentItem2 and according to that you can put the values like logType or anyother sub loop is there

Hope this may help you

Thanks,
Srini

we do see typo
grafik

Message vs message

Same also for timestamp

Hi @ppr and @J0ska
thanks, but the JSON properties are not case-sensitive. It is working for “message” and “timeStamp”. In my program, I also respected the case. But while it is working for “Message” it is not working for “logType”, where the case sensitivity is correct.

@Srini84 thank you for the advice but the second screenshot displays the value I am getting for currentItem2. All values are included, which is why I don’t know why it is not working the same…

I just tested one more thing:

  • I get the error message using “level”, which is case sensitive
  • When I change it to “Level”, which is actually not case-sensitive, it works. Yet, “Logtype” or “LogType” or “logType” does not work. I can’t make sense of it.

we can create this series:

Just in case: I am retrieving Orchestrator https data for robotlogs. Maybe this is related to the error?

And I tested it again. It works for “Message”. And now I created also a series as you did and noticed that it stopped working for “message”. And I get the same error for “message” as for “logType”. “Level” works and “level” does not work.

Object: image
image
image
image
image
image

I again think it is rather an UiPath bug.

we dont think so.

The best would be, you do share the JSON Data (as unmodified text file with us). Also tell us what is to achieve in this business case

keep in mind:

the raw message is a serialized JSON String. We have to desrialize it (additional, after first deserializing the HTTP Rest Response)

Also here we can see:
Level - Property at the object
level - property of the raw message

1 Like

Thank you already for your help.

Business Case:
Retrieving data from Orchestrator (robotlogs) and transferring them into our data warehouse.

I think that was the issue. I only deserialized it once. I did not know about the second deserialization. That makes sense. I will test it but I think this is the solution!

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.