JSON Format
JavaScript® Object Notation format
JavaScript Object Notation (JSON) is a data interchange format based on the JavaScript programming language. You can decode and encode JSON-formatted text. You can also import data from a JSON file into MATLAB® as a structure and write the contents of a structure to a JSON file (since R2023b).
Functions
jsondecode | Decode JSON-formatted text |
jsonencode | Create JSON-formatted text from structured MATLAB data |
readstruct | Create structure array from file (Since R2020b) |
writestruct | Write structure array to file (Since R2020b) |
readdictionary | Create dictionary from file (Since R2024b) |
writedictionary | Write dictionary to file (Since R2024b) |
Topics
- Customize JSON Encoding for MATLAB Classes
How to override the
jsonencode
function for user-defined classes.