Code Monkey home page Code Monkey logo

matlab_parse_json_youtube's Introduction

Modifications to code found at: http://au.mathworks.com/matlabcentral/fileexchange/20565-json-parser

In MATLAB (R2015b), field names in a structure can only contain alphanumeric characters and underscores. This is a problem when you wish for field names to be Youtube video ID's, as they can contain dashes. Also, field names must begin with a letter, while Youtube ID's frequently do not.

My modifications cause all field names to be prepended with 'Y_', and all dashes to be replaces with underscores. This must be factored into further use of the structure generated.

Original Description:

"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)"

matlab_parse_json_youtube's People

Contributors

alex-paterson avatar

Watchers

James Cloos avatar Ke Young avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.