The JSON object below causes ActiveSupport::JSON.decode
to throw the exception below. What causes this?
Exception:
795: unexpected token at ''
/usr/local/lib/ruby/gems/1.9.1/gems/json-1.8.1/lib/json/common.rb:155:in `parse'
/usr/local/lib/ruby/gems/1.9.1/gems/json-1.8.1/lib/json/common.rb:155:in `parse'
/usr/local/lib/ruby/gems/1.9.1/gems/multi_json-1.9.2/lib/multi_json/adapters/json_common.rb:16:in `load'
/usr/local/lib/ruby/gems/1.9.1/gems/multi_json-1.9.2/lib/multi_json/adapter.rb:20:in `load'
/usr/local/lib/ruby/gems/1.9.1/gems/multi_json-1.9.2/lib/multi_json.rb:121:in `load'
/usr/local/lib/ruby/gems/1.9.1/gems/activesupport-3.2.12/lib/active_support/json/decoding.rb:15:in `decode'
JSON object (from http://ift.tt/1Ke3BAu):
{
"resultCount":1,
"results": [
{"artistViewUrl":"http://ift.tt/1z2p4eK", "artworkUrl60":"http://ift.tt/1Ke3DIl",
"screenshotUrls":["http://ift.tt/1Ke3DIp", "http://ift.tt/1z2p5zi", "http://ift.tt/1Ke3BQI", "http://ift.tt/1z2p4v3"], "ipadScreenshotUrls":[], "artworkUrl512":"http://ift.tt/1Ke3BQK", "kind":"software", "features":[],
"supportedDevices":["iPadFourthGen4G", "iPhone6", "iPad23G", "iPhone5s", "iPadMini", "iPhone6Plus", "iPad2Wifi", "iPhone4S", "iPhone5", "iPadFourthGen", "iPhone4", "iPodTouchFifthGen", "iPadThirdGen", "iPadThirdGen4G", "iPadMini4G", "iPhone5c"], "advisories":[], "isGameCenterEnabled":false, "trackCensoredName":"Periscope", "trackViewUrl":"http://ift.tt/1Ke3BQM", "contentAdvisoryRating":"4+", "artworkUrl100":"http://ift.tt/1Ke3BQK", "languageCodesISO2A":["NB", "CA", "CS", "DA", "NL", "EN", "FR", "DE", "EL", "ID", "IT", "JA", "KO", "NN", "PL", "PT", "RU", "ZH", "ES", "SV", "ZH", "TR", "UK", "VI"], "fileSizeBytes":"15090739", "sellerUrl":"https://periscope.tv", "averageUserRatingForCurrentVersion":3.5, "userRatingCountForCurrentVersion":166, "trackContentRating":"4+", "currency":"USD", "wrapperType":"software", "version":"1.0.2",
"description":"Periscope lets you broadcast live video to the world. Going live will instantly notify your followers who can join, comment and send you hearts in real time. The more hearts you get, the higher they flutter on the screen.\n\nOther features:\n[+] REPLAY: When your broadcast is over, you can make it available for replay so viewers can watch later. Viewers can replay your broadcast with comments and hearts to relive the full experience. Replays currently last 24 hours. You can delete your replay at any time.\n[+] PRIVATE: If you want to broadcast to specific people, press the lock icon before going live and choose who you want to invite to your broadcast. \n[+] TWITTER: You can choose to share your Periscope broadcasts on Twitter by tapping the bird icon before you start broadcasting. When you go live, you’ll tweet a link so that your Twitter followers can watch on the web (or in the app)\n[+] MANAGE NOTIFICATIONS: Periscope will suggest people for you to follow based on your Twitter network. You can always follow new people, or unfollow them if you don’t want to be notified when they go live. You can also adjust notification preferences in Periscope Settings (in Profile)\n[+] HEARTS: Periscope keeps track of how many hearts you get from your viewers. The more hearts, the higher you get in the “Most Loved” list.", "artistId":296415947, "artistName":"Twitter, Inc.", "genres":["Social Networking"], "price":0.00, "bundleId":"com.bountylabs.periscope", "genreIds":["6005"], "releaseDate":"2015-03-26T07:01:50Z", "sellerName":"Twitter, Inc.", "trackName":"Periscope", "trackId":972909677, "primaryGenreName":"Social Networking", "primaryGenreId":6005,
"releaseNotes":"- New ‘Global’ section added to Periscope that lists the most recent, live broadcasts from around the world. Your home feed will only show live broadcasts and replays tailored to you.\n- A new “Follower Only” mode is available before starting your broadcast. If you turn this on, only viewers that YOU follow can comment in your broadcast.\n- Users who are verified are marked by the classic Twitter Verified badge you’re used to seeing.\n- Major scrolling performance improvements. This will feel silky and smooth compared to the last version!\n- You can block users more easily (tap on a comment to present the option to block)\n- Fixed a bug where viewers & broadcasters would sometimes stop seeing comments and hearts.\n- Fixed a caching issue where the wrong Profile image would get displayed for a user\n- Fixed a bug where some iOS 7 users couldn’t watch broadcasts with kajillions of viewers", "minimumOsVersion":"7.1", "formattedPrice":"Free", "userRatingCount":949, "averageUserRating":3.5}]
}
Aucun commentaire:
Enregistrer un commentaire