Unable to read value from json file using UFT

43 views Asked by At

I have a JSON file saved in a location, example -> C:\Users\Desktop\test.json

The contents of file are below;

{
"users":[{
      "username":"123"
       },
    {
      "username":"456"
         }
   ]
}

when I try to read this file using UFT (using the below code)

Set Dom = jsonutil.Parse("C:\Users\Desktop\test.json")

I am getting the error "Directory not found or Json format is invalid."

How do I read the contents of JSON file?

0

There are 0 answers