Main Content

mps.json.decode

Convert a character vector or string in MATLAB Production Server JSON schema to MATLAB data

Description

example

data = mps.json.decode(text) parses JSON schema for MATLAB® Production Server™ to convert it to MATLAB data.

Examples

collapse all

mps.json.decode('[[8,1,6],[3,5,7],[4,9,2]]')
ans =
     8     1     6
     3     5     7
     4     9     2
mps.json.decode('{"mwdata":[1,4,3,2],"mwsize":[2,2],"mwtype":"double"}')
ans =
      1     3
      4     2

Input Arguments

collapse all

JSON-formatted text that follows the schema for MATLAB Production Server, specified as a character vector or string.

text can be in various formats like small, large, NaNInfType, and PrettyPrint, as explained in Name-Value Arguments on the mps.json.encode page.

Output Arguments

collapse all

MATLAB data decoded from MATLAB Production Server JSON text.

Version History

Introduced in R2018a