JSON Parser
This function parses JSON strings. It converts JSON arrays into cell arrays and JSON objects into structures.
This can be used with webervices that return JSON data such as the API provided by Google®.
An example of use is:
google_search = 'http://ajax.googleapis.com/ajax/services/search/web?v=1.0&q=matlab';
matlab_results = parse_json(urlread(google_search));
disp(matlab_results{1}.responseData.results{1}.titleNoFormatting)
disp(matlab_results{1}.responseData.results{1}.visibleUrl)
Cita come
Joel Feenstra (2024). JSON Parser (https://www.mathworks.com/matlabcentral/fileexchange/20565-json-parser), MATLAB Central File Exchange. Recuperato .
Compatibilità della release di MATLAB
Compatibilità della piattaforma
Windows macOS LinuxCategorie
- MATLAB > Language Fundamentals > Data Types > Characters and Strings > String Parsing >
- MATLAB > Data Import and Analysis > Data Import and Export > Standard File Formats > JSON Format >
- MATLAB > External Language Interfaces > Web Services with MATLAB > Call Web Services from MATLAB Using HTTP >
Tag
Riconoscimenti
Ispirato: JSONLab (Development Branch), (another) JSON Parser, Highly portable JSON-input parser, Matlab-Pushbullet, Core_jsonparser: Import and Export JSON files using MATLAB, twitty, exchangerate.m, JSONLab: portable, robust JSON/binary-JSON encoder/decoder
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!Scopri Live Editor
Crea script con codice, output e testo formattato in un unico documento eseguibile.