Skip to content
This repository was archived by the owner on Apr 12, 2024. It is now read-only.

Refactor isJson() #75

Closed
wants to merge 1 commit into from
Closed

Conversation

vojtajina
Copy link
Contributor

Just refactored the regexps from $xhr to a separate function isJson(), added tests and fixed small issue...

…d tests and fixed small issue...

So, now string like " {..] " is not json.
To be honest, this method is still just very basic information, as validating json by regexps would be very tricky, better to just eval and see :-D

I did some simple benchmark and these new regexps should be same like the old ones.
@vojtajina
Copy link
Contributor Author

That sounds good. Closing this pull request.
Here is the issue #80

This pull request was closed.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants