Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

Wordpress and the JSON API


Published on

Published in: Technology, Business
  • Be the first to comment

  • Be the first to like this

Wordpress and the JSON API

  1. 1. Wordpress & JSON API @JaneOrganise
  2. 2. Why use Json? Matches data model of Key/value pairs Matches data structure of Objective C/Ruby Speed Size! 1/2 the size of xml
  3. 3. Parsing the Json iOS and Android both have inbuilt parsers iOS parser returns dictionary and arrays Objective classes are dictionary and arrays Post* post = [Post new]; [post setValuesForKeysWithDictionary:jsonDictionary];
  4. 4. Json Api Plugins Json-API Not changed in last 7 months, unsupported Simple interface Can exclude unnecessary returned content Limited documentation No solution for avatars
  5. 5. Json Api Plugins JSON REST API Developed as part of GSoC 2013 Not abandoned - WIP Functionality in docs that is not available yet submit comments, get users Not a simple interface - separate call to get media for non-featured images Only 5 posts returned per page
  6. 6. Json Api Plugins Jetpack Json Api Simple interface Good documentation with examples No option to reduce response data Have to use OAuth to submit comments & posts
  7. 7. Trouble with images Different post image sources Featured image Media attached to post Source URL embedded in post Making sure images cached Cache images at size required for display, not size given
  8. 8. Trouble with Posts Embedded html native clients don’t want info (text) and presentation (html/css) just data Wordpress doesn’t separate out this :( Need to parse/strip it out
  9. 9. Trouble with plugins Not necessarily posts Parsing more complicated
  10. 10. Submitting comments and posts Need oAuth2 to authenticate - adds a layer of complexity
  11. 11. Other Free Jetpack facilities Mobile Push Notifications Stats Post by Email - publish from email Subscriptions - notifications by email Sharing - with Facebook, Twitter etc
  12. 12. Questions?