[TASK] Replace JavaScriptEncoder with json_encode()