Invalid JSON in the JSON if playername contains "

Issue Description: The JSON that is inside the JSON is invalid if a playername contains a "
Steps to reproduce: Play DOTA2 with a name containing quotes, and try to parse the roster event.
Impact for my app: low
Do you currently have a workaround? No
text.zip (516 Bytes)
(note: data has been anonymized)
{
“feature”:“roster”,
“info”:{
“roster”:{
“players”:“[{"steamId": "7656110001","name" : "Nobody´s PlayerName","pickConfirmed" : false,"hero" : "","team" : 2,"role" : 4,"player_index" : 3},{"steamId": "7656110002","name" : "Abc"Def","pickConfirmed" : true,"hero" : "dazzle","team" : 2,"role" : 8,"player_index" : 1},{"steamId": "7656110003","name" : "Dr. PlayerName","pickConfirmed" : true,"hero" : "witch_doctor","team" : 3,"role" : 16,"player_index" : 7},{"steamId": "765611003","name" : "Iron","pickConfirmed" : true,"hero" : "dragon_knight","team" : 3,"role" : 2,"player_index" : 9},{"steamId": "765611004","name" : "MMUP","pickConfirmed" : true,"hero" : "disruptor","team" : 2,"role" : 16,"player_index" : 4},{"steamId": "765611005","name" : "PlayerName","pickConfirmed" : true,"hero" : "elder_titan","team" : 3,"role" : 8,"player_index" : 8},{"steamId": "765611006","name" : "PlayerName","pickConfirmed" : true,"hero" : "undying","team" : 2,"role" : 2,"player_index" : 2},{"steamId": "765611007","name" : "Stop PlayerName","pickConfirmed" : true,"hero" : "slark","team" : 2,"role" : 1,"player_index" : 0},{"steamId": "765611008","name" : "Any PlayerName","pickConfirmed" : false,"hero" : "","team" : 3,"role" : 4,"player_index" : 6},{"steamId": "765611009","name" : "asdf PlayerName","pickConfirmed" : true,"hero" : "spectre","team" : 3,"role" : 1,"player_index" : 5}]”
}
},
“type”:“info”
}

The invalid part is: … "name" : "Abc"Def" …

Another name we have seen in a different event is: … "name" : ""1"" …

No logs as of right now.


Edit: this forum steals escapes from the JSON. So look in the text.zip file for the raw data.

@JesperGloot We will check it and let you know. thanks

1 Like

@JesperGloot I downloaded the file and it’s a valid JSON. How did you parse it on your side?
In addition, it will help me if you can reproduce the bug and send me the client logs (the zip package).

Thanks

It is the info.roster.players part of the JSON that is invalid (as in the JSON inside of the JSON):
See this part:
\“name\” : \"Abc\“Def\”

Will reproduce and send logs.

Here are some logs and another event:

{“info”:{“roster”:{“players”:"[{\“steamId\”: \“7656119000000\”,\“name\” : \“Abc\“Green\”,\“pickConfirmed\” : false,\“hero\” : \“npc_dota_hero_spirit_breaker\”,\“team\” : 2,\“role\” : 0,\“player_index\” : 0}]”}},“feature”:“roster”}

Overwolf logsOverwolfLogs_2020-08-17_10-54-47.zip (1.4 MB)
Gamelog: 7314-1597654412269.zip (1.1 KB)

@eransharv any updates on this issue? :slight_smile:

As in do you see the issue in the JSON?

@JesperGloot it looks like a bug on our side.

I will open it now and update you with the progress. I can see that it’s a low impact bug. So I’ll put it on our backlog in mid priority. I will let you know when we will release the fix.

Thanks!

1 Like

We released a fix for this issue @JesperGloot (GEP 155.0.7)

1 Like

Can confirm, works now, as in can parse the roster event. :slight_smile:
Thanks, much appreciated!

1 Like