Archie
(Archie)
July 28, 2022, 10:11am
1
I have this problem with my queue. I have this queue item that I upload which contains a json format in one of it fields. It goes like this for example
newEmployee:
{
"Name": "Mark",
"EmployeID": 339511,
"Age": 25,
"BranchCode": "AGF523",
"Role": "Developer",
}
The problem is, upon uploading it in queue it will change to this
newEmployee:
{
\r\n \"Name\": \"Mark\",
\r\n \"EmployeID\": 339511,
\r\n \"Age\": 25,
\r\n \"BranchCode\": \"AGF523\",
\r\n \"Role\": \"Developer\",
}
Now, when I run it, it will give me an error of
Invalid property identifier character: \. Path '', line 1, position 1.
I’m not sure why it changes to this, I have some queues who are perfectly fine, some of them just randomly turns into this.
ppr
(Peter Preuss)
July 28, 2022, 10:14am
2
Archie:
Now, when I run it,
can you show us the details when using it? Thanks
Archie
(Archie)
July 28, 2022, 10:17am
3
If it’s the original json file, it comes from API. I’ll try to add the json file here.
ppr
(Peter Preuss)
July 28, 2022, 10:20am
4
we have a need on how you fetched and consume the json from the queue item?
In general it looks ok and was just serialized to a string
Archie
(Archie)
July 28, 2022, 10:32am
5
Sorry, I’m not quite familiar with json yet. The error comes when I try to deserialize it. I’m just wondering why it would sometimes serialize it to string, when most of my queues are formatted correctly.
ppr
(Peter Preuss)
July 28, 2022, 10:38am
6
it is up to you to share the implmentation details or not. We can best help, when do know some steps from your implementation