Unable to parse a Json String

Hi I am unable to parse a JSON String and read all the data from it.

Here is the JSON String.

{“Contract #”: “111111-22-S-00111”,“Mod #”: “X00000”,“Contract Type”: “Loan”,“111111-22-009222-X0000 Loan check.doc”: {“Rename to”: “File Name does not contain any key words identified to rename”,“File Type”: “”,“File Directory”: “”},“111111-22-00214-v0005_Chkbook_CPA DO TO.pdf”: {“Rename to”: “File Name does not contain any key words identified to rename”,“File Type”: “”,“File Directory”: “”}

Can anyone help me with this.

Thanks in advance

@Sairam_RPA
JSON Lint can help - https://jsonlint.com/
looks that a last } is missing:

Hi @ppr I am unable to parse this json string. When I use the Deserialize JSON activity. It converts it to JSON object but I cannot read the data inside the payload.
I am trying to use for each loop and set the type argument as Jobject.

But I am unable to read the values. I need these values from the JSON: “111111-22-009222-X0000 Loan check.doc” and “Rename to”: “File Name does not contain any key words identified to rename.

Can you help me with this?

So what is the result:

  • Deserialize JSON parse the data without exception - Parsing is OK
  • Deserialize JSON parse the data with exception - Parsing fails

Deserialize JSON - converts to json object - OK (PASS)
Deserialize JSON array - fails.

can you try:

YourJSONObject("111111-22-009222-X0000 Loan check.doc")("Rename to").toString
1 Like

Hi get the error message as " Accessed JObject values with invalid key value : 0. Object property name expected.

give me little time i will check

And also:
grafik

Hey @ppr

Nice solution, can you share xaml file?

Find starter help here:
JP_JOList_Get0_SpecPrp_Val.xaml (5.6 KB)

JSON:
data.json (453 Bytes)

And Also:

1 Like

Awesome…:slight_smile:

lets do one thing
one topic=one case this helps researchers to find case and solution

So close this topic by marking solving post and open another topic for other case.
Kindly note if structure is different, so also acess is different
Please reduce our efforts and provide json data as txt or json file. Thanks

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