Main Content

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 (since R2023b) or dictionary (since R2024b). You can write the contents of a structure or dictionary to a JSON file.

Functions

jsondecodeDecode JSON-formatted text
jsonencodeCreate JSON-formatted text from structured MATLAB data
readstructCreate structure array from file
writestructWrite structure array to file
readdictionaryCreate dictionary from file (Since R2024b)
writedictionaryWrite dictionary to file (Since R2024b)

Topics