Json data

Oct 21, 2015 at 2:08 AM
Hi, i would like a copy of the Tweets and Direct Messages in Json format so i can share this within other systems. I have used the JsonObjectReceived event but need to deserialize the json so i can detect what is related to a direct message and what is a tweet created by anyone but me.

I have used the following code to deserialize tweets:

var jsonConvert = TweetinviContainer.Resolve<IJsonObjectConverter>();
var tweetDTO = jsonConvert.DeserializeObject<ITweetDTO>(args.Json);
var tweet = Tweet.GenerateTweetFromDTO(tweetDTO);

but when it comes to Direct Messages, i dont see any way to deserialize the message.

Please advise.
Oct 21, 2015 at 10:51 AM
I ended up deserializing the json by mapping it to a custom object using json.net. Would have been nice to do something like tweet.tojson to get the raw data.
Oct 28, 2015 at 10:56 AM
Hi there,

Yes this feature will be added in version 1.1 of Tweetinvi. It has recently been requested multiple times.
You can find the Work Item here.

Marked as answer by linvi on 10/28/2015 at 2:57 AM