jsondecode
- :
obj =jsondecode(text)¶ - :
obj =jsondecode(text, name, value, …)¶ Convert the JSON document text into a Nexus value.
JSON numbers become doubles,
trueandfalsebecome logical values, strings become character rows and objects become scalar structures whose fields follow the order of the document.nullgives an empty matrix, orNaNwhen it sits inside an array of numbers.An array of numbers is returned as a column vector, an array of booleans as a logical column. Arrays of equally long arrays of numbers (or booleans) become matrices and, with deeper nesting, N-dimensional arrays, with
x(i,j,k)holding the elementjson[i][j][k]. An array of objects with identical members becomes a structure array. Any other array becomes a column cell array of its individually converted elements.Member names are turned into valid field names the way
matlab.lang.makeValidNamedoes. The options are"ReplacementStyle"("underscore","delete"or"hex"),"Prefix"(default"x") and"makeValidName"(a logical, default true; false keeps the names as written). Option names are not case sensitive.