Pablo_Sanchez
(Pablo Sánchez Hernández)
1
Hi folks!
Simply question. How would you deserialize this json?
{“id”:“44cdde5c-d9bb-438d-a09e-f1734ee93286”,
“articles”:[
{“articleId”:133414,“quantity”:1},
{“articleId”:114077,“quantity”:1},
{“articleId”:300831,“quantity”:1},
{“articleId”:301993,“quantity”:1}
]
},
{“id”:“b00239b7-11f6-448f-bb75-00627480f172”,
“articles”:[
{“articleId”:353825,“quantity”:1},
{“articleId”:158651,“quantity”:1},
{“articleId”:333579,“quantity”:1}
]
}
Thank you guys,
regards
ppr
(Peter Preuss)
2
before we can proceed, we have to correct the json, done with Json LINT
[{
"id": "44cdde5c-d9bb-438d-a09e-f1734ee93286",
"articles": [{
"articleId": 133414,
"quantity": 1
},
{
"articleId": 114077,
"quantity": 1
},
{
"articleId": 300831,
"quantity": 1
},
{
"articleId": 301993,
"quantity": 1
}
]
}, {
"id": "b00239b7-11f6-448f-bb75-00627480f172",
"articles": [{
"articleId": 353825,
"quantity": 1
},
{
"articleId": 158651,
"quantity": 1
},
{
"articleId": 333579,
"quantity": 1
}
]
}]
does this represent your JSCN data?
then we can parse as a JArray like:
with the help of UiPath.WebApi.Activities
1 Like
postwick
(Paul)
3
UiPath.WebAPI.Activities library has JSON activities and functions.
Pablo_Sanchez
(Pablo Sánchez Hernández)
4
Thanks sir,
What kind of output argument has your deserialize activity?
Regards
ppr
(Peter Preuss)
5
When clicking on the output fiield and typing STRG+K a new variable of the correct datatype will be created. The datatype will be
ensure: UiPath.WebApi.Activities is added to the project via the package manager
1 Like
Pablo_Sanchez
(Pablo Sánchez Hernández)
6
That’s what I needed, thank you @ppr
Mio problemo () is I used Deserialize activity instead Deserialize Array.
Cheeeers
system
(system)
Closed
7
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.