update json_api file logic and recursive plugin dirs