Simplify exportToJSON component of import/export loader