opts = jsonImportOptions()
opts = jsonImportOptions('NumVariables', numVars)
opts = jsonImportOptions(..., Name, Value)
| Paramètre | Description |
|---|---|
| numVars | nombre de variables (défaut : 1). |
| Name, Value | noms et valeurs des propriétés de l'objet, et 'ParsingMode' ('lenient' ou 'strict') qui fixe AllowComments, AllowInfAndNaN et AllowTrailingCommas. |
| Paramètre | Description |
|---|---|
| opts | Objet nelson.io.json.JSONImportOptions. |
jsonImportOptions crée un objet d'options d'importation pour les fichiers JSON, à utiliser avec readtable et readtimetable. detectImportOptions renvoie le même objet, rempli à partir d'un fichier JSON.
Propriétés :
true).L'objet utilise la classe Nelson nelson.io.json.JSONImportOptions.
f = [tempdir, 'students.json']; fid = fopen(f, 'w'); fprintf(fid, '%s', '[{"Name": {"FirstName": "Priya"}}, {"Name": {"FirstName": "Conor"}}]'); fclose(fid); opts = jsonImportOptions('VariableSelectors', "/Name/FirstName", 'TableSelector', "") T = readtable(f, opts)
| Version | Description |
|---|---|
| 2.0.0 | version initiale |