JQuery JSON Training Videos for Beginner - PowerPoint PPT Presentation

About This Presentation
Title:

JQuery JSON Training Videos for Beginner

Description:

Courseing provides JSON training videos for beginners to learn JavaScript object nation(JSON) concepts like JSON MIME Types, Parsing text to JSON format,GetJSON Method and Rendering it's Response, AJAX based submitting form data in JSON format, Implementation of getJSON Methods, JSON Call Back Functions topics in brief.Also access free resources of JQuery online tutorials. – PowerPoint PPT presentation

Number of Views:48

less

Transcript and Presenter's Notes

Title: JQuery JSON Training Videos for Beginner


1
JQuery JSON Training Videos for Beginner by
2
Highlights
  • JSON MIME Type
  • Parsing text to JSON format
  • GetJSON Method and Rendering it's Response
  • AJAX based submitting form data in JSON format
  • Implementation of getJSON Methods
  • Call Back Functions

3
JSON MIME Type
  • application/json, text/JavaScript, text/json,
    text/x-json are the four different mime types
    available for JSON data.
  • Application/ json JSON text MIME media type.
  • Application/ json mime type is adopted by most of
    modern implementations.
  • All most all the applications support mime types.
  • Service providers, browsers, servers, web
    applications, libraries, frameworks, and APIs use
    mime types.
  • Google search API, Flickr, Facebook API and Yahoo
    are example that use MIMEs.

4
Parsing text to JSON format
  • JSON stands for JavaScript Object Notation.
  • JSON.parse() method converts JSON string into an
    object.
  • Syntax JSON.parse(text , reviver)
  • Text is a valid JSON string which is mandatory.
  • Reviver is an optional function uses to transform
    the results.
  • Functions in JSON should be written in the form
    of strings.

5
GetJSON Method and Rendering it's Response
  • GetJSON loads JSON encoded data from the server
    using a GET HTTP request.
  • Syntax jQuery.getJSON( url , data , success
    )
  • URL is a string that contains the URL to which
    the request is sent.
  • Data is a string or plain object which is sent to
    the server with the request.
  • Success is a callback function which get executed
    if the request succeeds.

6
AJAX based submitting form data in JSON format
  • Ajax is useful to exchange the data with servers
    and also update minor changes of a web pages. It
    updates content without reloading the web pages.
  • Ensure the jQuery library is available in the
    page to build then Insert the default web form to
    the page.
  • Now edit form's action form and insert the custom
    bits and final step of the setup is to rig the
    form to the custom script. Syntax
    theForm.submit()
  • Attach theForm.submit() with jqsub().

7
Implementation of getJSON Methods
  • Simple implementation of getJSON is as follows
  • function getJSON( url, cb)
  • var xhr new XMLHttpRequest()
  • xhr.open("GET", url, true)
  • xhr.onreadystatechange function()
  • if (xhr.status ! 100 xhr.readyState ! 4)
    return
  • cb( JSON.parse( xhr.responseText ))
    xhr.send()

8
Call Back Functions
  • Call back functions useful to manage callback
    lists.
  • These functions adds, remove, fire, and disables
    callbacks.
  • callbacks.add(), callbacks.disable(),
    callbacks.disabled(), callbacks.empty(),
    callbacks .fire(), callbacks.fired(),
    callbacks.fireWith(), callbacks.has(),
    callbacks.lock(), callbacks. locked(),
    callbacks.remove(), jQuery.Callbacks() are
    various call back functions of JSON.
  • callbacks.add() function adds a callback or a
    collection of callbacks to a callback list.
  • callbacks.disable() function disables a callback
    list from doing anything more.

9
Call Back Functions
  • callbacks.fire() function calls all of the
    callbacks with the given arguments.
  • callbacks.remove() function remove a callback or
    a collection of callbacks from a callback list.
  • callbacks.lock() function locks callback list in
    its current state.
  • jQuery.Callbacks() function manages callback
    lists.
  • callbacks.locked() function determines if the
    callbacks list has been locked.
  • callbacks.fired() function determines if the
    callbacks been called at least once.

10
Feedback
Like It ? Hate It?
We would love to hear from you whatever you think
about the course.
Click HERE to share what you think!
11
Thank you
Thank You for Watching JQuery JSON Training
Videos for Beginner by
http//www.courseing.com
Write a Comment
User Comments (0)
About PowerShow.com