From 9fbd37a5f3b72e3bf51fcf0273a1d6bf7fbf941e Mon Sep 17 00:00:00 2001 From: Vitaly Takmazov Date: Fri, 14 Jun 2013 17:52:11 +0400 Subject: [PATCH] Twitter backend: fixed json parsing --- backends/twitter/TwitterResponseParser.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/backends/twitter/TwitterResponseParser.cpp b/backends/twitter/TwitterResponseParser.cpp index 9c927ea9..7d87e9f8 100644 --- a/backends/twitter/TwitterResponseParser.cpp +++ b/backends/twitter/TwitterResponseParser.cpp @@ -50,9 +50,9 @@ EmbeddedStatus getEmbeddedStatus(const rapidjson::Value &element) status.setTweet( unescape ( std::string( element[TwitterReponseTypes::text.c_str()].GetString() ) ) ); status.setTruncated( element[TwitterReponseTypes::truncated.c_str()].GetBool()); status.setReplyToStatusID( element[TwitterReponseTypes::in_reply_to_status_id.c_str()].IsNull() ? -"" : std::string(element[TwitterReponseTypes::in_reply_to_status_id.c_str()].GetString()) ); +"" : std::to_string(element[TwitterReponseTypes::in_reply_to_status_id.c_str()].GetInt64()) ); status.setReplyToUserID( element[TwitterReponseTypes::in_reply_to_user_id.c_str()].IsNull() ? -"" : std::string(element[TwitterReponseTypes::in_reply_to_user_id.c_str()].GetString()) ); +"" : std::to_string(element[TwitterReponseTypes::in_reply_to_user_id.c_str()].GetInt64()) ); status.setReplyToScreenName( element[TwitterReponseTypes::in_reply_to_screen_name.c_str()].IsNull() ? "" : std::string(element[TwitterReponseTypes::in_reply_to_screen_name.c_str()].GetString()) ); status.setRetweetCount( element[TwitterReponseTypes::retweet_count.c_str()].GetInt64() ); @@ -88,9 +88,9 @@ Status getStatus(const rapidjson::Value &element) status.setTweet( unescape ( std::string( element[TwitterReponseTypes::text.c_str()].GetString() ) ) ); status.setTruncated( element[TwitterReponseTypes::truncated.c_str()].GetBool()); status.setReplyToStatusID( element[TwitterReponseTypes::in_reply_to_status_id.c_str()].IsNull() ? -"" : std::string(element[TwitterReponseTypes::in_reply_to_status_id.c_str()].GetString()) ); +"" : std::to_string(element[TwitterReponseTypes::in_reply_to_status_id.c_str()].GetInt64()) ); status.setReplyToUserID( element[TwitterReponseTypes::in_reply_to_user_id.c_str()].IsNull() ? -"" : std::string(element[TwitterReponseTypes::in_reply_to_user_id.c_str()].GetString()) ); +"" : std::to_string(element[TwitterReponseTypes::in_reply_to_user_id.c_str()].GetInt64()) ); status.setReplyToScreenName( element[TwitterReponseTypes::in_reply_to_screen_name.c_str()].IsNull() ? "" : std::string(element[TwitterReponseTypes::in_reply_to_screen_name.c_str()].GetString()) ); status.setUserData( getUser(element[TwitterReponseTypes::user.c_str()]) );