Built in Fairfield County: Front End Developers Meetup

Slides:



Advertisements
Similar presentations
Copyright © Steven W. Johnson
Advertisements

JSON Valery Ivanov.
JSON IDU0075 Sissejuhatus veebiteenustesse.  JSON stands for JavaScript Object Notation  JSON is lightweight text-data interchange format  JSON is.
Working with JavaScript. 2 Objectives Introducing JavaScript Inserting JavaScript into a Web Page File Writing Output to the Web Page Working with Variables.
15-Jul-15 JSON. JSON example “JSON” stands for “JavaScript Object Notation” Despite the name, JSON is a (mostly) language-independent way of specifying.
JSON (JavaScript Object Notation).  A lightweight data-interchange format  A subset of the object literal notation of JavaScript (or ECMA-262).  A.
JSON The Fat Free Alternative to XML. Data Interchange The key idea in Ajax. An alternative to page replacement. Applications delivered as pages. How.
RESTful applications Norman White. REST Representational state transfer Key concepts – Client Server architecture built on transferring resources between.
Lecture 13 – XML and JSON SFDV3011 – Advanced Web Development Reference: 1.
Copyright © Curt Hill Sounds, Resource Packs, JSON What more would you want?
XP Tutorial 10New Perspectives on Creating Web Pages with HTML, XHTML, and XML 1 Working with JavaScript Creating a Programmable Web Page for North Pole.
Serialization. Serialization is the process of converting an object into an intermediate format that can be stored (e.g. in a file or transmitted across.
JSON Java Script Object Notation Copyright © 2013 Curt Hill.
XP Tutorial 10New Perspectives on HTML and XHTML, Comprehensive 1 Working with JavaScript Creating a Programmable Web Page for North Pole Novelties Tutorial.
JSON and A Comparison of Scripts. JSON: JavaScript Object Notation Based on a subset of the JavaScript Programming Language provides a standardized data.
4. Javascript M. Udin Harun Al Rasyid, S.Kom, Ph.D Lab Jaringan Komputer (C-307) Desain.
JSON – Java Script Object Notation. What is JSON JSON is a data interchange format Interactive Web 2.0 applications, no more use page replacement. Data.
AJAX. Ajax  $.get  $.post  $.getJSON  $.ajax  json and xml  Looping over data results, success and error callbacks.
JavaScript. JavaScript Introduction JavaScript is the world's most popular programming language. It is the language for HTML and the web, for servers,
OVERVIEW AND PARSING JSON. What is JSON JavaScript Object Notation Used to format data Commonly used in Web as a vehicle to describe data being sent between.
JSON JavaScript Object Notation. Introduction (What is JSON?) A lightweight text based data-interchange format Language independent Subset of JavaScript.
JSON. JSON as an XML Alternative JSON is a light-weight alternative to XML for data- interchange JSON = JavaScript Object Notation It’s really language.
JSON (Copied from and from Prof Da Silva) Week 12 Web site:
XP Tutorial 10New Perspectives on HTML, XHTML, and DHTML, Comprehensive 1 Working with JavaScript Creating a Programmable Web Page for North Pole Novelties.
JSON JavaScript Object Notation Douglas Crockford Yahoo! Inc.
XML & JSON. Background XML and JSON are to standard, textual data formats for representing arbitrary data – XML stands for “eXtensible Markup Language”
JQuery, JSON, AJAX. AJAX: Async JavaScript & XML In traditional Web coding, to get information from a database or a file on the server –make an HTML form.
XML Databases Presented By: Pardeep MT15042 Anurag Goel MT15006.
Introduction to Mongo DB(NO SQL data Base)
PHP using MySQL Database for Web Development (part II)
Storing Data.
Using JMP® Visualization for A Bike-Sharing Program in NYC
ITM 352 Data types, Variables
Presented By: Prof. D.W.Chadwick Other Author: D.Mundy
Exporting and Importing Data
JSON Crash Course Traversy Media.
Exporting and Importing Data
Scope, Objects, Strings, Numbers
Consuming Java Script Object Notation (JSON) feeds
XML in Web Technologies
Ajax Design Patterns – Programming Practices in Web Services
JavaScript Object Notation
Server-Side Application and Data Management IT IS 3105 (Spring 2010)
JSON Object and JSON Schema
Web-Technology Lecture 6.
Session V HTML5 APIs - AJAX & JSON
Objectives Insert a script element Write JavaScript comments
{. “speaker”:. “Emanuele Zanchettin”,. “session” :
WEB PROGRAMMING JavaScript.
Intro to NoSQL Databases
JSON.
HTML Level II (CyberAdvantage)
PHP.
HTML5 AJAX & JSON APIs
2017, Fall Pusan National University Ki-Joune Li
JSON Data Demo.
Intro to NoSQL Databases
JSON for the Data Mortal
JSON++ - A Simple class library for JSON
Integrating REST API and SQL Server JSON Functions
Department of Computer Science Cal State East Bay, Hayward, CA
CS 240 – Advanced Programming Concepts
Lecture 5- Semi-Structured Data (XML, JSON)
Semi-Structured Data (XML, JSON)
PHP an introduction.
Both XML ad JSON are designed to transport data
Class 4: Building Interactive Web Pages
Allyson Falkner Spokane County ISD
JSON: JavaScript Object Notation
Intro to NoSQL Databases
Presentation transcript:

Built in Fairfield County: Front End Developers Meetup JSON: The Basics Built in Fairfield County: Front End Developers Meetup Tues. May 14, 2013

About Jeff Fox (@jfox015) 16 year web development professional (Almost) entirely self taught Has used various Ajax-esque data technologies since 2000, including XML, MS data islands and AMF for Flash Develops JavaScript based web apps that rely on JSON for data workflow

Overview What is JSON? Comparisons with XML Syntax Data Types Usage Live Examples

What is JSON?

JSON is… A lightweight text based data-interchange format Completely language independent Based on a subset of the JavaScript Programming Language Easy to understand, manipulate and generate

JSON is NOT… Overly Complex A “document” format A markup language A programming language

Why use JSON? Straightforward syntax Easy to create and manipulate Can be natively parsed in JavaScript using eval() Supported by all major JavaScript frameworks Supported by most backend technologies

JSON vs. XML

Much Like XML Plain text formats “Self-describing“ (human readable) Hierarchical (Values can contain lists of objects or values)

Not Like XML Lighter and faster than XML JSON uses typed objects. All XML values are type-less strings and must be parsed at runtime. Less syntax, no semantics Properties are immediately accessible to JavaScript code

Knocks against JSON Lack of namespaces No inherit validation (XML has DTD and templates, but there is JSONlint) Not extensible It’s basically just not XML

Syntax

JSON Object Syntax Unordered sets of name/value pairs Begins with { (left brace) Ends with } (right brace) Each name is followed by : (colon) Name/value pairs are separated by , (comma)

JSON Example var employeeData = { "employee_id": 1234567, "name": "Jeff Fox", "hire_date": "1/1/2013", "location": "Norwalk, CT", "consultant": false };

Arrays in JSON An ordered collection of values Begins with [ (left bracket) Ends with ] (right bracket) Name/value pairs are separated by , (comma)

JSON Array Example var employeeData = { "employee_id": 1236937, "name": "Jeff Fox", "hire_date": "1/1/2013", "location": "Norwalk, CT", "consultant": false, "random_nums": [ 24,65,12,94 ] };

Data Types

Data Types: Strings Sequence of 0 or more Unicode characters Wrapped in "double quotes“ Backslash escapement

Data Types: Numbers Integer Real Scientific No octal or hex No NaN or Infinity – Use null instead.

Data Types: Booleans & Null Booleans: true or false Null: A value that specifies nothing or no value.

Data Types: Objects & Arrays Objects: Unordered key/value pairs wrapped in { } Arrays: Ordered key/value pairs wrapped in [ ]

JSON Usage

How & When to use JSON Transfer data to and from a server Perform asynchronous data calls without requiring a page refresh Working with data stores Compile and save form or user data for local storage

Where is JSON used today? Anywhere and everywhere! And many, many more!

Simple Example

Simple Demo Build a JSON data object in code Display raw output Display formatted output Manipulate via form input

Questions?

Resources Simple Demo on Github: https://github.com/jfox015/BIFC-Simple-JSON-Demo Another JSON Tutorial: http://iviewsource.com/codingtutorials/getting-started-with-javascript-object-notation-json-for-absolute-beginners/ JSON.org: http://www.json.org/