cai2json filename.cai
will output filename.cai.json edit in whatever. don't worry about changing the quaternion section, it gets recalculated.
cai2json filename.cai.json filenamenew.cai to save the file back to cai.
very limited testing. please tell me how it goes