16-10-24 10:27 AM
Hello Community members,
Help required in parsing the JSON file and trying to extract the values using JSON path.
Tried to extract using "Utility - JSON::JsonPath". It works fine. But for returning a collection something went wrong.
In "Utility - JSON::JsonPath - Return Collection" I'm getting the following error:
Exception thrown --> "Internal : Could not execute code stage because exception thrown by code stage: Unable to cast object of type 'System.String' to type 'System.Data.DataTable'."
JSON for parsing:
I/P tab details in Utility - JSON::JsonPath - Return Collection:
---------------------------------------------------------------------------------
O/P tab details in Utility - JSON::JsonPath - Return Collection:
----------------------------------------------------------------------------------
Thanks in Advance,
Cuckoo George
20-10-24 06:14 AM
Hi @Cuckoo
The code is unable to find the value in the json. when it try to identify the names it is returned as empty value and eventually it tried to create a collection from the empty value that is teh root cause of exception.
YOu need to make sure your json structure and name of the json property is accurate
22-10-24 10:56 AM
Hi @Cuckoo,
Thank you for being a SS&C Blue Prism customer, and for using Blue Prism. From what I can tell, you are trying to search the array and return a name value pair. V10.0.1 of the asset doesn't support this, however I have been working on 10.0.2 which resolves this issue and provides the outcome you require. Thank you for bringing this shortfall to our attention and I hope the new revision will resolve your issues.
Thanks again for using Blue Prism and for your interest in the Json Asset.
regards