sitespeedio / chrome-har

Create HAR files from Chrome Debugging Protocol data
MIT License
149 stars 50 forks source link

normalize json format #3

Closed kalw closed 7 years ago

kalw commented 7 years ago

Normalize post data json content with double quote when single quote are present.

kalw commented 7 years ago

credits trayez

tobli commented 7 years ago

Hi @kalw! Could you please explain the background for this PR. Are you experiencing a problem that you want to solve? I don't understand why you're changing the data that's posted. E.g. {"text": "abc'def"} would be changed to {"text": "abc\"def"}

/Tobias

kalw commented 7 years ago

Hi @tobli !

You're totally right, I've tried quickly -too quickly- to solve a HAR parsing issue where some json resource present are "badly" formated like {'text': 'abc"def'}.

Let me find a proper way to lint it.

-- Regis A. Despres

tobli commented 7 years ago

Ok, thanks. Do you have an example of a Chrome log that generates an invalid har?

tobli commented 7 years ago

I'm closing this PR now, but please open a new issue if you find an example of an invalid generated HAR file.