Справочная информация: собрал твиты из потокового API в текстовый файл и успешно проанализировал каждую строку в моих java-объектах с помощью библиотеки json.org.Отлично.
Проблема: Из поля «текст»: - Я хочу извлечь информацию, это работает наполовину.Однако я получаю это исключение, выполняя мой код:
org.json.JSONException: Expected a ',' or '}' at 1280 [character 1281 line 1]
Пытаясь определить, где в моем текстовом файле это находится, я вижу только обычные символы, и с учетом того, что библиотека json.org делает то, что должна,почему я это получаю?С чего мне начать?
Это строка 1280 в моем файле.Персонаж 1281 - это «о», поэтому я понятия не имею, что я делаю неправильно.
{"retweet_count": null, "text": "Прослушивание не обманывало меня претендентов на @Grooveshark: http: \ / \ / tinysong.com \ / o9ui #musicmonday #nowplaying " "id_str": "28756412823", "сущности": { "URL": [{ "индексы": [63,87], "expanded_url": нулевой, "URL":" HTTP: \ / \ / tinysong.com \ / o9ui "}]," Хештеги ": [{" текст ":" musicmonday», "индексы": [88100]}, { "текст": "nowplaying", "индексы": [101112]}], "user_mentions": [{ "id_str": "3806441", "индексы": [49,61], "screen_name": "название" "Grooveshark": "Grooveshark", "идентификатор": 3806441}]},"координаты": нулевой, "Процитировал": ложь, "in_reply_to_status_id": нулевой, "место": нулевой, "гео": нулевой, "new_id_str": "608552371148029952", "источник": "веб", "new_id":608552371148029952, «усеченный»: ложный, «in_reply_to_status_id_str»: нулевой, «избранный»: ложный, «in_reply_to_user_id_str»: нулевой, «create_at»: «вт 26 октября 03:40:05 +0000 2010», «contributors»: null"user": {"follow_request_sent": null, "lang": "en", "time_zone": "La Paz", "id_str": "24490174", "follow": null, "profile_text_color": "666666","followers_count": 466, "Profile_background_image_url ":" http: \ / \ / a3.twimg.com \ / profile_background_images \ / 113185343 \ /x0f8a90fc4af7484f7a0c6c11d594f94.png "," profile_link_color ":" 3399CC ", являюсь сложным.Немного ботаник и выродок с социальными навыками, как бы маловероятно это ни звучало.Активный геймер.Любитель музыки, фильмов, книг и еды." "Listed_count": 18, "уведомления": NULL, "profile_background_tile": правда, "statuses_count": 17095, "profile_sidebar_fill_color": "202020", "profile_image_url":" HTTP: \ / \ / a0.twimg.com\ / profile_images \ / 1117295836 \ /geekydot2_normal.jpg "," location ":" Доминиканская Республика "," show_all_inline_media ": false," profile_use_background_image ": false," contributors_enabled ": false," friends_count ": 339," profile_sidebar_border ""666666", "protected": false, "screen_name": "dotina", "geo_enabled": false, "creation_at": "Sun Mar 15 05:06:39 +0000 2009", "name": "Ligia Carri \u00f3n " "favourites_count": 0, "URL": "HTTP: \ / \ / geekydot.wordpress.com \ /", "идентификатор": 24490174, "проверено" ложь "utc_offset": - 14400," profile_background_color":" 202020 "}," in_reply_to_screen_name ": null," in_reply_to_user_id ": null," id ": 28756412823}
и здесь тоже самое, в формате:
{
"retweet_count": null,
"text": "Listening to Don't Get Me Wrong by Pretenders on @Grooveshark: http:\/\/tinysong.com\/o9ui #musicmonday #nowplaying",
"id_str": "28756412823",
"entities": {
"urls": [
{
"indices": [
63,
87
],
"expanded_url": null,
"url": "http:\/\/tinysong.com\/o9ui"
}
],
"hashtags": [
{
"text": "musicmonday",
"indices": [
88,
100
]
},
{
"text": "nowplaying",
"indices": [
101,
112
]
}
],
"user_mentions": [
{
"id_str": "3806441",
"indices": [
49,
61
],
"screen_name": "Grooveshark",
"name": "Grooveshark",
"id": 3806441
}
]
},
"coordinates": null,
"retweeted": false,
"in_reply_to_status_id": null,
"place": null,
"geo": null,
"new_id_str": "608552371148029952",
"source": "web",
"new_id": 608552371148029952,
"truncated": false,
"in_reply_to_status_id_str": null,
"favorited": false,
"in_reply_to_user_id_str": null,
"created_at": "Tue Oct 26 03:40:05 +0000 2010",
"contributors": null,
"user": {
"follow_request_sent": null,
"lang": "en",
"time_zone": "La Paz",
"id_str": "24490174",
"following": null,
"profile_text_color": "666666",
"followers_count": 466,
"profile_background_image_url": "http:\/\/a3.twimg.com\/profile_background_images\/113185343\/x0f8a90fc4af7484f7a0c6c11d594f94.png",
"profile_link_color": "3399CC",
"description": "I'm a complex being. A bit of a nerd and a geek with social skills, as unlikely as that may sound. Active gamer. Lover of music, movies, books and food. ",
"listed_count": 18,
"notifications": null,
"profile_background_tile": true,
"statuses_count": 17095,
"profile_sidebar_fill_color": "202020",
"profile_image_url": "http:\/\/a0.twimg.com\/profile_images\/1117295836\/geekydot2_normal.jpg",
"location": "Dominican Republic",
"show_all_inline_media": false,
"profile_use_background_image": false,
"contributors_enabled": false,
"friends_count": 339,
"profile_sidebar_border_color": "666666",
"protected": false,
"screen_name": "dotina",
"geo_enabled": false,
"created_at": "Sun Mar 15 05:06:39 +0000 2009",
"name": "Ligia Carri\u00f3n",
"favourites_count": 0,
"url": "http:\/\/geekydot.wordpress.com\/",
"id": 24490174,
"verified": false,
"utc_offset": -14400,
"profile_background_color": "202020"
},
"in_reply_to_screen_name": null,
"in_reply_to_user_id": null,
"id": 28756412823
}