Hi all,
Sometimes, I am unable to convert the Json object to the Json array.
The below is the output string I am receiving as an output from deserialized activity.
“{”“projects”“: {”“project”“: {
““domain-name””: ““TRAINING””,
““create-from-domain””: ““deFAULT””,
““is-auto-mail-enabled””: false,
““description””: ““Created on 8/30/2023 5:10:49 AM””,
““db-server-name””: ““testawssqld01"”,
““uid””: ““e75a4a25-9627-4658-ab93-0dd71dc3ed6b””,
““id””: 412,
““users-quota””: -1,
““domain-id””: 2,
““is-qpm-auto-calc-enabled””: true,
““is-active””: true,
““is-unicode””: false,
““db-name””: ““training_test_test_kg_nongxp_db””,
““version””: ““15.50"”,
““search-language””: ““English””,
““project-type””: ““Standard””,
““is-template””: false,
““exception-file””: “”””,
““is-db-native-auth””: false,
““db-type””: 2,
““name””: ““Test_Test_KG_NonGxp””,
““physical-directory””: “”\\test\share\ProgramData\MF\Test\repository\qc\TRAINING_2\Test_Test_KG_NonGxp\”",
““db-connstr-format””: ““jdbc:sqlserver://testld01:1433"”,
““create-from-project””: ““Templet””,
““has-vcs-db””: true
}}}”
While converting this as an array I am facing the Below error.
In the Json array activity, I am using the Code as
"JSONObject.SelectToken(“projects”)(“project”).ToString "
The below is the error I am receiving
Error reading JArray from JsonReader. Current JsonReader item is not an array: StartObject. Path ‘’, line 1, position 1
Do we have any way that we can directly convert the fetch what we required from the string.
Kindly do the needfull.
Thanks
Sreenivasa