Move scanone2json function into package