Closed jbailey closed 6 years ago
Yeah there are a lot of instances of these unfortunately. The JSON implementation in the codebase doesn't create a single JSON blob, but rather converts the python structs to be in the JSON format. I realise that doesn't help you but hopefully explains what's going on :)
As Daniel said, it's because it's not straight converting the entire Python dict to valid JSON. I would recommend looking at other branches to see how they've gotten around this. My branch splits into a py package, but you can see in the function I added how I handled the output JSON.
On Fri, Feb 12, 2016 at 12:25 PM, Daniel Grieve notifications@github.com wrote:
Yeah there are a lot of instances of these unfortunately. The JSON implementation in the codebase doesn't create a single JSON blob, but rather converts the python structs to be in the JSON format. I realise that doesn't help you but hopefully explains what's going on :)
— Reply to this email directly or view it on GitHub https://github.com/Blizzard/heroprotocol/issues/26#issuecomment-183475978 .
Cher Stewart
You cannot do all the good the world needs, but the world needs all the good you can do.
For posterity, the JSON output is a line-delimited stream. Read the JSON output line-by-line and decode each line independently as a sequence of events.
python /Users/jbailey/workspace/heroprotocol/heroprotocol.py --json --trackerevents Sky\ Temple\ (82).StormReplay
I get the following error when running the json through a parser. Note, this is outside of python, but json is json.
Parse Error: "m_slotId": 0}{ "m_playerId":