I'm using 4.1beta Spine editor and 4.0 unity runtime.
So I select 4.0 when I output my skeleton json file:

Then an error occurs in Unity:
Failed to read version info at skeleton 'Shiro'. It is likely not a valid Spine SkeletonData file.
System.FormatException: Input string was not in the correct format
at System.Int32.Parse (System.String s, NumberStyles style, IFormatProvider provider) [0x00012] in /Users/builduser/buildslave/mono/build/mcs/class/corlib/System/Int32.cs:640
at System.Int32.Parse (System.String s, IFormatProvider provider) [0x00000] in /Users/builduser/buildslave/mono/build/mcs/class/corlib/System/Int32.cs:208
at Spine.Unity.SkeletonDataCompatibility.GetVersionInfo (UnityEngine.TextAsset asset, System.Boolean& isSpineSkeletonData, System.String& problemDescription) [0x00230] in E:\git\unity\Shiro\Assets\Spine\Runtime\spine-unity\Asset Types\SkeletonDataCompatibility.cs:154
And the SkeletonData shows an error too:

After modifying the Version in the json file from "4.0-from-4.1.26-beta" to "4.0.64", the error goes away and everything runs well.
I think the error occurs because the version string ("4.0-from-4.1.26-beta") does not fit the Regex in the SkeletonDataCompatibility.cs:
static readonly Regex jsonVersionRegex = new Regex(@[quote]spine""\s[i]:\s[/i]""([^""]+)[/quote], RegexOptions.CultureInvariant);
Hope this will help you fix the bug!