Skip to content
New issue

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

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

Already on GitHub? # to your account

JSONTestSuite test results #171

Open
l1bbcsg opened this issue May 4, 2018 · 0 comments
Open

JSONTestSuite test results #171

l1bbcsg opened this issue May 4, 2018 · 0 comments

Comments

@l1bbcsg
Copy link

l1bbcsg commented May 4, 2018

There's this Parsing JSON is a Minefield article which details various issues (mostly in edge cases) across different JSON parsers.

Its author produced a test suit to test various implementations. I've run this test suit against Oboe (on node 9.6.1), results compared to native JSON.parse are below (successful tests not shown).

Generally, I think the results are good. But there's one thing that Oboe does different from native implementation (and others): It allows some malformed inputs slide where JSON.parse does not.

I'm raising this issue more for the purposes of discussion. What do you think, should this be addressed?

Results screenshot

Image

Legend

image

Snippet I used to run Oboe (derived from their JSON.parse):

var fs = require('fs');
var path = process.argv[2];
var oboe = require('oboe');

try {
	var stream = fs.createReadStream(path);
	oboe(stream).fail(function(e) {
		if (e.thrown)
			throw e.thrown;
	});
} catch (e) {
	console.log("--", e.message)
	process.exit(1);
}

process.exit(0);

Note that at the time of writing the test runner has a really weird bug preventing it from running which isn't hard to patch out though.

I'm a bit confused on relationship between Oboe and Clarinet, website states Oboe is based on Clarinet, but I don't see it as a dependancy and the test results of Oboe are somewhat different from Clarinet. If you do have any interest in Clarinet, I opened a similar issues there: dscape/clarinet#49.

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

No branches or pull requests

1 participant