Blender to Funscript Solution?

Read my research here.
Actually my keyframe export script takes a quaternion and writes it as Euler angles to json (which is the funscript).