<div id="foo" data-version="1.0">...</div>
jsversion = $("#foo").data("version");
jsversion is now the number 1. That is totally wrong if you intend to use that attribute as a string. (I was using it to create a URL where "1.0" is the valid value.)
You can get around this with direct access: $("#foo").attr("data-version") but that's not as much fun. Also, the process is not reversible which is confusing:
val = $("#foo").data("foo");
// val is the string "1.0" and not converted to number 1.
// passing in 1.0 vs "1.0" would of course result in 1.
I'd suggest the automatic conversion be removed and let users deal with it as needed. Perhaps add a helper function or alternate data() function to do conversion. The way it works now is intentional and has test cases but I'm unsure what the motivation of this conversion is in the first place? Would it break a common use case to just always treat attributes as strings?