Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rejects valid JSON #344

Open
zmagickap opened this issue Aug 20, 2020 · 0 comments
Open

Rejects valid JSON #344

zmagickap opened this issue Aug 20, 2020 · 0 comments

Comments

@zmagickap
Copy link

I have a block of JSON that passes validation at https://jsonlint.com:

{
"cmd": "alertTriggerUpdate",
"success": "OK",
"resultcode": 200,
"result": {
"alertID": "CVCQ9S0EHE",
"alertType": "Scan",
"alertDesc": "Scan",
"alertLongDesc": "Triggered by a Portfolio Scan",
"sym": "CLNY",
"timeStamp": "2020-08-19T23:33:57.144",
"triggerValue": 2.79,
"description": "Alert "GRGSignal 3" on CLNY Scan "GRG Signal Scan"\r\nCrossover=2.78&Bottom=2.78",
"alertName": "GRGSignal 3",
"alertString": "Crossover=2.78&Bottom=2.78",
"fromScan": true
}
}

But, when I try to deserialize, I get an "Unexpected end of stream" error.

The issue appears to be with the escaped quotes inside the description element. When I remove that, it deserializes just fine.

I switched to Jil for its speed but I now have bosses encouraging me to switch back to Newtonsoft because they'd rather have compatibility even if it's a bit slower.

But, I'm still fighting to keep Jil.

Any chance of a fix any time soon?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant