nlohmann / json

JSON for Modern C++
https://json.nlohmann.me
MIT License
41.33k stars 6.58k forks source link

Add more specific error message when attempting to parse empty input #4180

Closed colbychaskell closed 8 months ago

colbychaskell commented 9 months ago

Addresses #4037

Modifies the sax parser to create an exception with a more specific error message when attempting to parse an empty input string or stream.

Modifies corresponding tests to expect the new error message.


Pull request checklist

Read the Contribution Guidelines for detailed information.

Please don't

coveralls commented 9 months ago

Coverage Status

coverage: 100.0%. remained the same when pulling 5c22104acfcff60f3a01b99d4c86c38529e88aa4 on colbychaskell:fix-parse-error-wording into edffad036d5a93ab5a10f72a7d835eeb0d2948f9 on nlohmann:develop.

github-actions[bot] commented 9 months ago

🔴 Amalgamation check failed! 🔴

The source code has not been amalgamated. @colbychaskell Please read and follow the Contribution Guidelines.

github-actions[bot] commented 9 months ago

🔴 Amalgamation check failed! 🔴

The source code has not been amalgamated. @colbychaskell Please read and follow the Contribution Guidelines.

nlohmann commented 9 months ago

Can you please try to amalgamate with an older version of astyle, like astyle 3.2? There was a breaking change in astyle which makes the output differ unfortunately.

colbychaskell commented 9 months ago

@nlohmann amalgamated with astyle 3.1 and it seems to have worked correctly now

nlohmann commented 8 months ago

Thanks!