can't parse a (probably) valid json object
up vote
2
down vote
favorite
I am trying to parse a json object whith following code in python 3.
import json
str = '"created_at":"Sun Aug 30 13:59:15 +0000 2015","id":637987951842951168,"id_str":"637987951842951168","text":"The Truth About the Iran Vatican False Prophet Anglo-American Western Alliance for Antichrist Israel: Palestin... http://t.co/G79X164K9g","source":"u003ca href="http://twitterfeed.com" rel="nofollow"u003etwitterfeedu003c/au003e","truncated":false,"in_reply_to_status_id":null,"in_reply_to_status_id_str":null,"in_reply_to_user_id":null,"in_reply_to_user_id_str":null,"in_reply_to_screen_name":null,"user":"id":311859117,"id_str":"311859117","name":"Miko Furura","screen_name":"MikoFurura","location":"","url":null,"description":null,"protected":false,"verified":false,"followers_count":10,"friends_count":3,"listed_count":2,"favourites_count":4,"statuses_count":1264,"created_at":"Mon Jun 06 05:32:44 +0000 2011","utc_offset":32400,"time_zone":"Osaka","geo_enabled":false,"lang":"en","contributors_enabled":false,"is_translator":false,"profile_background_color":"EBEBEB","profile_background_image_url":"http://abs.twimg.com/images/themes/theme7/bg.gif","profile_background_image_url_https":"https://abs.twimg.com/images/themes/theme7/bg.gif","profile_background_tile":false,"profile_link_color":"990000","profile_sidebar_border_color":"DFDFDF","profile_sidebar_fill_color":"F3F3F3","profile_text_color":"333333","profile_use_background_image":true,"profile_image_url":"http://abs.twimg.com/sticky/default_profile_images/default_profile_3_normal.png","profile_image_url_https":"https://abs.twimg.com/sticky/default_profile_images/default_profile_3_normal.png","default_profile":false,"default_profile_image":true,"following":null,"follow_request_sent":null,"notifications":null,"geo":null,"coordinates":null,"place":null,"contributors":null,"retweet_count":0,"favorite_count":0,"entities":"hashtags":,"trends":,"urls":["url":"http://t.co/G79X164K9g","expanded_url":"http://bit.ly/1KvlIEu","display_url":"bit.ly/1KvlIEu","indices":[114,136]],"user_mentions":,"symbols":,"favorited":false,"retweeted":false,"possibly_sensitive":false,"filter_level":"low","lang":"en","timestamp_ms":"1440943155619"'
c = json.loads(str)
print(c['id'])
when I execute the script, I got an error:
json.decoder.JSONDecodeError: Expecting ',' delimiter: line 1 column 270 (char 269)
I have parsed many json objects with this code and can't understand what is wrong with it now, or what is wrong with this particular json object.
Regards.
python json
add a comment |
up vote
2
down vote
favorite
I am trying to parse a json object whith following code in python 3.
import json
str = '"created_at":"Sun Aug 30 13:59:15 +0000 2015","id":637987951842951168,"id_str":"637987951842951168","text":"The Truth About the Iran Vatican False Prophet Anglo-American Western Alliance for Antichrist Israel: Palestin... http://t.co/G79X164K9g","source":"u003ca href="http://twitterfeed.com" rel="nofollow"u003etwitterfeedu003c/au003e","truncated":false,"in_reply_to_status_id":null,"in_reply_to_status_id_str":null,"in_reply_to_user_id":null,"in_reply_to_user_id_str":null,"in_reply_to_screen_name":null,"user":"id":311859117,"id_str":"311859117","name":"Miko Furura","screen_name":"MikoFurura","location":"","url":null,"description":null,"protected":false,"verified":false,"followers_count":10,"friends_count":3,"listed_count":2,"favourites_count":4,"statuses_count":1264,"created_at":"Mon Jun 06 05:32:44 +0000 2011","utc_offset":32400,"time_zone":"Osaka","geo_enabled":false,"lang":"en","contributors_enabled":false,"is_translator":false,"profile_background_color":"EBEBEB","profile_background_image_url":"http://abs.twimg.com/images/themes/theme7/bg.gif","profile_background_image_url_https":"https://abs.twimg.com/images/themes/theme7/bg.gif","profile_background_tile":false,"profile_link_color":"990000","profile_sidebar_border_color":"DFDFDF","profile_sidebar_fill_color":"F3F3F3","profile_text_color":"333333","profile_use_background_image":true,"profile_image_url":"http://abs.twimg.com/sticky/default_profile_images/default_profile_3_normal.png","profile_image_url_https":"https://abs.twimg.com/sticky/default_profile_images/default_profile_3_normal.png","default_profile":false,"default_profile_image":true,"following":null,"follow_request_sent":null,"notifications":null,"geo":null,"coordinates":null,"place":null,"contributors":null,"retweet_count":0,"favorite_count":0,"entities":"hashtags":,"trends":,"urls":["url":"http://t.co/G79X164K9g","expanded_url":"http://bit.ly/1KvlIEu","display_url":"bit.ly/1KvlIEu","indices":[114,136]],"user_mentions":,"symbols":,"favorited":false,"retweeted":false,"possibly_sensitive":false,"filter_level":"low","lang":"en","timestamp_ms":"1440943155619"'
c = json.loads(str)
print(c['id'])
when I execute the script, I got an error:
json.decoder.JSONDecodeError: Expecting ',' delimiter: line 1 column 270 (char 269)
I have parsed many json objects with this code and can't understand what is wrong with it now, or what is wrong with this particular json object.
Regards.
python json
1
One way to debug this is the load it into a json pretty printer and see if its able to parse or locate the error its pointing to
– ritlew
Nov 9 at 19:50
@ritlew I tried it and it's completely valid there.
– Ali Crash
Nov 9 at 19:55
2
Well, what isline 1 column 270 (char 269)?
– cricket_007
Nov 9 at 19:58
1
It is near a backslash.
– trincot
Nov 9 at 19:59
add a comment |
up vote
2
down vote
favorite
up vote
2
down vote
favorite
I am trying to parse a json object whith following code in python 3.
import json
str = '"created_at":"Sun Aug 30 13:59:15 +0000 2015","id":637987951842951168,"id_str":"637987951842951168","text":"The Truth About the Iran Vatican False Prophet Anglo-American Western Alliance for Antichrist Israel: Palestin... http://t.co/G79X164K9g","source":"u003ca href="http://twitterfeed.com" rel="nofollow"u003etwitterfeedu003c/au003e","truncated":false,"in_reply_to_status_id":null,"in_reply_to_status_id_str":null,"in_reply_to_user_id":null,"in_reply_to_user_id_str":null,"in_reply_to_screen_name":null,"user":"id":311859117,"id_str":"311859117","name":"Miko Furura","screen_name":"MikoFurura","location":"","url":null,"description":null,"protected":false,"verified":false,"followers_count":10,"friends_count":3,"listed_count":2,"favourites_count":4,"statuses_count":1264,"created_at":"Mon Jun 06 05:32:44 +0000 2011","utc_offset":32400,"time_zone":"Osaka","geo_enabled":false,"lang":"en","contributors_enabled":false,"is_translator":false,"profile_background_color":"EBEBEB","profile_background_image_url":"http://abs.twimg.com/images/themes/theme7/bg.gif","profile_background_image_url_https":"https://abs.twimg.com/images/themes/theme7/bg.gif","profile_background_tile":false,"profile_link_color":"990000","profile_sidebar_border_color":"DFDFDF","profile_sidebar_fill_color":"F3F3F3","profile_text_color":"333333","profile_use_background_image":true,"profile_image_url":"http://abs.twimg.com/sticky/default_profile_images/default_profile_3_normal.png","profile_image_url_https":"https://abs.twimg.com/sticky/default_profile_images/default_profile_3_normal.png","default_profile":false,"default_profile_image":true,"following":null,"follow_request_sent":null,"notifications":null,"geo":null,"coordinates":null,"place":null,"contributors":null,"retweet_count":0,"favorite_count":0,"entities":"hashtags":,"trends":,"urls":["url":"http://t.co/G79X164K9g","expanded_url":"http://bit.ly/1KvlIEu","display_url":"bit.ly/1KvlIEu","indices":[114,136]],"user_mentions":,"symbols":,"favorited":false,"retweeted":false,"possibly_sensitive":false,"filter_level":"low","lang":"en","timestamp_ms":"1440943155619"'
c = json.loads(str)
print(c['id'])
when I execute the script, I got an error:
json.decoder.JSONDecodeError: Expecting ',' delimiter: line 1 column 270 (char 269)
I have parsed many json objects with this code and can't understand what is wrong with it now, or what is wrong with this particular json object.
Regards.
python json
I am trying to parse a json object whith following code in python 3.
import json
str = '"created_at":"Sun Aug 30 13:59:15 +0000 2015","id":637987951842951168,"id_str":"637987951842951168","text":"The Truth About the Iran Vatican False Prophet Anglo-American Western Alliance for Antichrist Israel: Palestin... http://t.co/G79X164K9g","source":"u003ca href="http://twitterfeed.com" rel="nofollow"u003etwitterfeedu003c/au003e","truncated":false,"in_reply_to_status_id":null,"in_reply_to_status_id_str":null,"in_reply_to_user_id":null,"in_reply_to_user_id_str":null,"in_reply_to_screen_name":null,"user":"id":311859117,"id_str":"311859117","name":"Miko Furura","screen_name":"MikoFurura","location":"","url":null,"description":null,"protected":false,"verified":false,"followers_count":10,"friends_count":3,"listed_count":2,"favourites_count":4,"statuses_count":1264,"created_at":"Mon Jun 06 05:32:44 +0000 2011","utc_offset":32400,"time_zone":"Osaka","geo_enabled":false,"lang":"en","contributors_enabled":false,"is_translator":false,"profile_background_color":"EBEBEB","profile_background_image_url":"http://abs.twimg.com/images/themes/theme7/bg.gif","profile_background_image_url_https":"https://abs.twimg.com/images/themes/theme7/bg.gif","profile_background_tile":false,"profile_link_color":"990000","profile_sidebar_border_color":"DFDFDF","profile_sidebar_fill_color":"F3F3F3","profile_text_color":"333333","profile_use_background_image":true,"profile_image_url":"http://abs.twimg.com/sticky/default_profile_images/default_profile_3_normal.png","profile_image_url_https":"https://abs.twimg.com/sticky/default_profile_images/default_profile_3_normal.png","default_profile":false,"default_profile_image":true,"following":null,"follow_request_sent":null,"notifications":null,"geo":null,"coordinates":null,"place":null,"contributors":null,"retweet_count":0,"favorite_count":0,"entities":"hashtags":,"trends":,"urls":["url":"http://t.co/G79X164K9g","expanded_url":"http://bit.ly/1KvlIEu","display_url":"bit.ly/1KvlIEu","indices":[114,136]],"user_mentions":,"symbols":,"favorited":false,"retweeted":false,"possibly_sensitive":false,"filter_level":"low","lang":"en","timestamp_ms":"1440943155619"'
c = json.loads(str)
print(c['id'])
when I execute the script, I got an error:
json.decoder.JSONDecodeError: Expecting ',' delimiter: line 1 column 270 (char 269)
I have parsed many json objects with this code and can't understand what is wrong with it now, or what is wrong with this particular json object.
Regards.
python json
python json
edited Nov 9 at 19:50
asked Nov 9 at 19:47
Ali Crash
931210
931210
1
One way to debug this is the load it into a json pretty printer and see if its able to parse or locate the error its pointing to
– ritlew
Nov 9 at 19:50
@ritlew I tried it and it's completely valid there.
– Ali Crash
Nov 9 at 19:55
2
Well, what isline 1 column 270 (char 269)?
– cricket_007
Nov 9 at 19:58
1
It is near a backslash.
– trincot
Nov 9 at 19:59
add a comment |
1
One way to debug this is the load it into a json pretty printer and see if its able to parse or locate the error its pointing to
– ritlew
Nov 9 at 19:50
@ritlew I tried it and it's completely valid there.
– Ali Crash
Nov 9 at 19:55
2
Well, what isline 1 column 270 (char 269)?
– cricket_007
Nov 9 at 19:58
1
It is near a backslash.
– trincot
Nov 9 at 19:59
1
1
One way to debug this is the load it into a json pretty printer and see if its able to parse or locate the error its pointing to
– ritlew
Nov 9 at 19:50
One way to debug this is the load it into a json pretty printer and see if its able to parse or locate the error its pointing to
– ritlew
Nov 9 at 19:50
@ritlew I tried it and it's completely valid there.
– Ali Crash
Nov 9 at 19:55
@ritlew I tried it and it's completely valid there.
– Ali Crash
Nov 9 at 19:55
2
2
Well, what is
line 1 column 270 (char 269)?– cricket_007
Nov 9 at 19:58
Well, what is
line 1 column 270 (char 269)?– cricket_007
Nov 9 at 19:58
1
1
It is near a backslash.
– trincot
Nov 9 at 19:59
It is near a backslash.
– trincot
Nov 9 at 19:59
add a comment |
3 Answers
3
active
oldest
votes
up vote
7
down vote
accepted
The solution is to use r in from of your string
str = r'"created_at":"Sun Aug 30 13:59:15 ...'
This helps interpret your str variable as a raw string so you won't have trouble with the backslashes inside the json string.
add a comment |
up vote
0
down vote
Try putting r before the string in str. I just tried it and it worked for me. Check out Lexical Analysis for more info.
str = r'"created_at":"Sun Aug 30 13:59:15 +0000 2015","id":637987951842951168,"id_str":"637987951842951168","text":"The Truth About the Iran Vatican False Prophet Anglo-American Western Alliance for Antichrist Israel: Palestin... http://t.co/G79X164K9g","source":"u003ca href="http://twitterfeed.com" rel="nofollow"u003etwitterfeedu003c/au003e","truncated":false,"in_reply_to_status_id":null,"in_reply_to_status_id_str":null,"in_reply_to_user_id":null,"in_reply_to_user_id_str":null,"in_reply_to_screen_name":null,"user":"id":311859117,"id_str":"311859117","name":"Miko Furura","screen_name":"MikoFurura","location":"","url":null,"description":null,"protected":false,"verified":false,"followers_count":10,"friends_count":3,"listed_count":2,"favourites_count":4,"statuses_count":1264,"created_at":"Mon Jun 06 05:32:44 +0000 2011","utc_offset":32400,"time_zone":"Osaka","geo_enabled":false,"lang":"en","contributors_enabled":false,"is_translator":false,"profile_background_color":"EBEBEB","profile_background_image_url":"http://abs.twimg.com/images/themes/theme7/bg.gif","profile_background_image_url_https":"https://abs.twimg.com/images/themes/theme7/bg.gif","profile_background_tile":false,"profile_link_color":"990000","profile_sidebar_border_color":"DFDFDF","profile_sidebar_fill_color":"F3F3F3","profile_text_color":"333333","profile_use_background_image":true,"profile_image_url":"http://abs.twimg.com/sticky/default_profile_images/default_profile_3_normal.png","profile_image_url_https":"https://abs.twimg.com/sticky/default_profile_images/default_profile_3_normal.png","default_profile":false,"default_profile_image":true,"following":null,"follow_request_sent":null,"notifications":null,"geo":null,"coordinates":null,"place":null,"contributors":null,"retweet_count":0,"favorite_count":0,"entities":"hashtags":,"trends":,"urls":["url":"http://t.co/G79X164K9g","expanded_url":"http://bit.ly/1KvlIEu","display_url":"bit.ly/1KvlIEu","indices":[114,136]],"user_mentions":,"symbols":,"favorited":false,"retweeted":false,"possibly_sensitive":false,"filter_level":"low","lang":"en","timestamp_ms":"1440943155619"'
add a comment |
up vote
0
down vote
In this part you could remove double quotes (") from html.
"source":"u003ca href="http://twitterfeed.com" rel="nofollow"u003etwitterfeedu003c/au003e"
to
"source":"u003ca href=http://twitterfeed.com rel=nofollowu003etwitterfeedu003c/au003e"
the extra double quotes are creating cyclic errors in JSON parser and HTML is fine without double quotes inside elements.
add a comment |
3 Answers
3
active
oldest
votes
3 Answers
3
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
7
down vote
accepted
The solution is to use r in from of your string
str = r'"created_at":"Sun Aug 30 13:59:15 ...'
This helps interpret your str variable as a raw string so you won't have trouble with the backslashes inside the json string.
add a comment |
up vote
7
down vote
accepted
The solution is to use r in from of your string
str = r'"created_at":"Sun Aug 30 13:59:15 ...'
This helps interpret your str variable as a raw string so you won't have trouble with the backslashes inside the json string.
add a comment |
up vote
7
down vote
accepted
up vote
7
down vote
accepted
The solution is to use r in from of your string
str = r'"created_at":"Sun Aug 30 13:59:15 ...'
This helps interpret your str variable as a raw string so you won't have trouble with the backslashes inside the json string.
The solution is to use r in from of your string
str = r'"created_at":"Sun Aug 30 13:59:15 ...'
This helps interpret your str variable as a raw string so you won't have trouble with the backslashes inside the json string.
edited Nov 9 at 19:59
answered Nov 9 at 19:55
Gabe
31229
31229
add a comment |
add a comment |
up vote
0
down vote
Try putting r before the string in str. I just tried it and it worked for me. Check out Lexical Analysis for more info.
str = r'"created_at":"Sun Aug 30 13:59:15 +0000 2015","id":637987951842951168,"id_str":"637987951842951168","text":"The Truth About the Iran Vatican False Prophet Anglo-American Western Alliance for Antichrist Israel: Palestin... http://t.co/G79X164K9g","source":"u003ca href="http://twitterfeed.com" rel="nofollow"u003etwitterfeedu003c/au003e","truncated":false,"in_reply_to_status_id":null,"in_reply_to_status_id_str":null,"in_reply_to_user_id":null,"in_reply_to_user_id_str":null,"in_reply_to_screen_name":null,"user":"id":311859117,"id_str":"311859117","name":"Miko Furura","screen_name":"MikoFurura","location":"","url":null,"description":null,"protected":false,"verified":false,"followers_count":10,"friends_count":3,"listed_count":2,"favourites_count":4,"statuses_count":1264,"created_at":"Mon Jun 06 05:32:44 +0000 2011","utc_offset":32400,"time_zone":"Osaka","geo_enabled":false,"lang":"en","contributors_enabled":false,"is_translator":false,"profile_background_color":"EBEBEB","profile_background_image_url":"http://abs.twimg.com/images/themes/theme7/bg.gif","profile_background_image_url_https":"https://abs.twimg.com/images/themes/theme7/bg.gif","profile_background_tile":false,"profile_link_color":"990000","profile_sidebar_border_color":"DFDFDF","profile_sidebar_fill_color":"F3F3F3","profile_text_color":"333333","profile_use_background_image":true,"profile_image_url":"http://abs.twimg.com/sticky/default_profile_images/default_profile_3_normal.png","profile_image_url_https":"https://abs.twimg.com/sticky/default_profile_images/default_profile_3_normal.png","default_profile":false,"default_profile_image":true,"following":null,"follow_request_sent":null,"notifications":null,"geo":null,"coordinates":null,"place":null,"contributors":null,"retweet_count":0,"favorite_count":0,"entities":"hashtags":,"trends":,"urls":["url":"http://t.co/G79X164K9g","expanded_url":"http://bit.ly/1KvlIEu","display_url":"bit.ly/1KvlIEu","indices":[114,136]],"user_mentions":,"symbols":,"favorited":false,"retweeted":false,"possibly_sensitive":false,"filter_level":"low","lang":"en","timestamp_ms":"1440943155619"'
add a comment |
up vote
0
down vote
Try putting r before the string in str. I just tried it and it worked for me. Check out Lexical Analysis for more info.
str = r'"created_at":"Sun Aug 30 13:59:15 +0000 2015","id":637987951842951168,"id_str":"637987951842951168","text":"The Truth About the Iran Vatican False Prophet Anglo-American Western Alliance for Antichrist Israel: Palestin... http://t.co/G79X164K9g","source":"u003ca href="http://twitterfeed.com" rel="nofollow"u003etwitterfeedu003c/au003e","truncated":false,"in_reply_to_status_id":null,"in_reply_to_status_id_str":null,"in_reply_to_user_id":null,"in_reply_to_user_id_str":null,"in_reply_to_screen_name":null,"user":"id":311859117,"id_str":"311859117","name":"Miko Furura","screen_name":"MikoFurura","location":"","url":null,"description":null,"protected":false,"verified":false,"followers_count":10,"friends_count":3,"listed_count":2,"favourites_count":4,"statuses_count":1264,"created_at":"Mon Jun 06 05:32:44 +0000 2011","utc_offset":32400,"time_zone":"Osaka","geo_enabled":false,"lang":"en","contributors_enabled":false,"is_translator":false,"profile_background_color":"EBEBEB","profile_background_image_url":"http://abs.twimg.com/images/themes/theme7/bg.gif","profile_background_image_url_https":"https://abs.twimg.com/images/themes/theme7/bg.gif","profile_background_tile":false,"profile_link_color":"990000","profile_sidebar_border_color":"DFDFDF","profile_sidebar_fill_color":"F3F3F3","profile_text_color":"333333","profile_use_background_image":true,"profile_image_url":"http://abs.twimg.com/sticky/default_profile_images/default_profile_3_normal.png","profile_image_url_https":"https://abs.twimg.com/sticky/default_profile_images/default_profile_3_normal.png","default_profile":false,"default_profile_image":true,"following":null,"follow_request_sent":null,"notifications":null,"geo":null,"coordinates":null,"place":null,"contributors":null,"retweet_count":0,"favorite_count":0,"entities":"hashtags":,"trends":,"urls":["url":"http://t.co/G79X164K9g","expanded_url":"http://bit.ly/1KvlIEu","display_url":"bit.ly/1KvlIEu","indices":[114,136]],"user_mentions":,"symbols":,"favorited":false,"retweeted":false,"possibly_sensitive":false,"filter_level":"low","lang":"en","timestamp_ms":"1440943155619"'
add a comment |
up vote
0
down vote
up vote
0
down vote
Try putting r before the string in str. I just tried it and it worked for me. Check out Lexical Analysis for more info.
str = r'"created_at":"Sun Aug 30 13:59:15 +0000 2015","id":637987951842951168,"id_str":"637987951842951168","text":"The Truth About the Iran Vatican False Prophet Anglo-American Western Alliance for Antichrist Israel: Palestin... http://t.co/G79X164K9g","source":"u003ca href="http://twitterfeed.com" rel="nofollow"u003etwitterfeedu003c/au003e","truncated":false,"in_reply_to_status_id":null,"in_reply_to_status_id_str":null,"in_reply_to_user_id":null,"in_reply_to_user_id_str":null,"in_reply_to_screen_name":null,"user":"id":311859117,"id_str":"311859117","name":"Miko Furura","screen_name":"MikoFurura","location":"","url":null,"description":null,"protected":false,"verified":false,"followers_count":10,"friends_count":3,"listed_count":2,"favourites_count":4,"statuses_count":1264,"created_at":"Mon Jun 06 05:32:44 +0000 2011","utc_offset":32400,"time_zone":"Osaka","geo_enabled":false,"lang":"en","contributors_enabled":false,"is_translator":false,"profile_background_color":"EBEBEB","profile_background_image_url":"http://abs.twimg.com/images/themes/theme7/bg.gif","profile_background_image_url_https":"https://abs.twimg.com/images/themes/theme7/bg.gif","profile_background_tile":false,"profile_link_color":"990000","profile_sidebar_border_color":"DFDFDF","profile_sidebar_fill_color":"F3F3F3","profile_text_color":"333333","profile_use_background_image":true,"profile_image_url":"http://abs.twimg.com/sticky/default_profile_images/default_profile_3_normal.png","profile_image_url_https":"https://abs.twimg.com/sticky/default_profile_images/default_profile_3_normal.png","default_profile":false,"default_profile_image":true,"following":null,"follow_request_sent":null,"notifications":null,"geo":null,"coordinates":null,"place":null,"contributors":null,"retweet_count":0,"favorite_count":0,"entities":"hashtags":,"trends":,"urls":["url":"http://t.co/G79X164K9g","expanded_url":"http://bit.ly/1KvlIEu","display_url":"bit.ly/1KvlIEu","indices":[114,136]],"user_mentions":,"symbols":,"favorited":false,"retweeted":false,"possibly_sensitive":false,"filter_level":"low","lang":"en","timestamp_ms":"1440943155619"'
Try putting r before the string in str. I just tried it and it worked for me. Check out Lexical Analysis for more info.
str = r'"created_at":"Sun Aug 30 13:59:15 +0000 2015","id":637987951842951168,"id_str":"637987951842951168","text":"The Truth About the Iran Vatican False Prophet Anglo-American Western Alliance for Antichrist Israel: Palestin... http://t.co/G79X164K9g","source":"u003ca href="http://twitterfeed.com" rel="nofollow"u003etwitterfeedu003c/au003e","truncated":false,"in_reply_to_status_id":null,"in_reply_to_status_id_str":null,"in_reply_to_user_id":null,"in_reply_to_user_id_str":null,"in_reply_to_screen_name":null,"user":"id":311859117,"id_str":"311859117","name":"Miko Furura","screen_name":"MikoFurura","location":"","url":null,"description":null,"protected":false,"verified":false,"followers_count":10,"friends_count":3,"listed_count":2,"favourites_count":4,"statuses_count":1264,"created_at":"Mon Jun 06 05:32:44 +0000 2011","utc_offset":32400,"time_zone":"Osaka","geo_enabled":false,"lang":"en","contributors_enabled":false,"is_translator":false,"profile_background_color":"EBEBEB","profile_background_image_url":"http://abs.twimg.com/images/themes/theme7/bg.gif","profile_background_image_url_https":"https://abs.twimg.com/images/themes/theme7/bg.gif","profile_background_tile":false,"profile_link_color":"990000","profile_sidebar_border_color":"DFDFDF","profile_sidebar_fill_color":"F3F3F3","profile_text_color":"333333","profile_use_background_image":true,"profile_image_url":"http://abs.twimg.com/sticky/default_profile_images/default_profile_3_normal.png","profile_image_url_https":"https://abs.twimg.com/sticky/default_profile_images/default_profile_3_normal.png","default_profile":false,"default_profile_image":true,"following":null,"follow_request_sent":null,"notifications":null,"geo":null,"coordinates":null,"place":null,"contributors":null,"retweet_count":0,"favorite_count":0,"entities":"hashtags":,"trends":,"urls":["url":"http://t.co/G79X164K9g","expanded_url":"http://bit.ly/1KvlIEu","display_url":"bit.ly/1KvlIEu","indices":[114,136]],"user_mentions":,"symbols":,"favorited":false,"retweeted":false,"possibly_sensitive":false,"filter_level":"low","lang":"en","timestamp_ms":"1440943155619"'
answered Nov 9 at 20:08
Greg
11
11
add a comment |
add a comment |
up vote
0
down vote
In this part you could remove double quotes (") from html.
"source":"u003ca href="http://twitterfeed.com" rel="nofollow"u003etwitterfeedu003c/au003e"
to
"source":"u003ca href=http://twitterfeed.com rel=nofollowu003etwitterfeedu003c/au003e"
the extra double quotes are creating cyclic errors in JSON parser and HTML is fine without double quotes inside elements.
add a comment |
up vote
0
down vote
In this part you could remove double quotes (") from html.
"source":"u003ca href="http://twitterfeed.com" rel="nofollow"u003etwitterfeedu003c/au003e"
to
"source":"u003ca href=http://twitterfeed.com rel=nofollowu003etwitterfeedu003c/au003e"
the extra double quotes are creating cyclic errors in JSON parser and HTML is fine without double quotes inside elements.
add a comment |
up vote
0
down vote
up vote
0
down vote
In this part you could remove double quotes (") from html.
"source":"u003ca href="http://twitterfeed.com" rel="nofollow"u003etwitterfeedu003c/au003e"
to
"source":"u003ca href=http://twitterfeed.com rel=nofollowu003etwitterfeedu003c/au003e"
the extra double quotes are creating cyclic errors in JSON parser and HTML is fine without double quotes inside elements.
In this part you could remove double quotes (") from html.
"source":"u003ca href="http://twitterfeed.com" rel="nofollow"u003etwitterfeedu003c/au003e"
to
"source":"u003ca href=http://twitterfeed.com rel=nofollowu003etwitterfeedu003c/au003e"
the extra double quotes are creating cyclic errors in JSON parser and HTML is fine without double quotes inside elements.
answered Nov 9 at 20:18
Babak
1769
1769
add a comment |
add a comment |
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53232383%2fcant-parse-a-probably-valid-json-object%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
1
One way to debug this is the load it into a json pretty printer and see if its able to parse or locate the error its pointing to
– ritlew
Nov 9 at 19:50
@ritlew I tried it and it's completely valid there.
– Ali Crash
Nov 9 at 19:55
2
Well, what is
line 1 column 270 (char 269)?– cricket_007
Nov 9 at 19:58
1
It is near a backslash.
– trincot
Nov 9 at 19:59