Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Carl Fraser 10 posts 40 karma points
    Jun 15, 2013 @ 11:51
    Carl Fraser
    0

    Cannot deserialize JSON object

    Hi

    I have written a usercontrol to retrieve tweets using the Twitter API 1.1. The user control then uses the NewtonSoft DLL to deserialize the JSON data into a list which it then uses to populate a repeater.

    This all works fine locally, however when I upload the user control to the site, create an Umbraco macro and reference it, I get the following error:-

    Cannot deserialize JSON object (i.e. {"name":"value"}) into type 'System.Collections.Generic.List`1[RotherCFR.CFGetTweets+TwitterTweet]'.The deserialized type should be a normal .NET type (i.e. not a primitive type like integer, not a collection type like an array or List) or a dictionary type (i.e. Dictionary).To force JSON objects to deserialize add the JsonObjectAttribute to the type. Path 'errors', line 1, position 10.

    Any ideas why this works fine locally but not once uploaded?

    Many thanks

    Best regards

    Carl

Please Sign in or register to post replies

Write your reply to:

Draft