jQuery AJAX request failing in IE

Fixed, I changed the content-type from application/json; charset=utf8 to just plain application/json. I hate IE 🙂 Also to avoid IE super-caching try this: var d = new Date(); $.ajax({ url:”{{SITE_URL}}/content/twitter.json?_=”+d.getTime(), …Snip… That way each request is a new url for IE to get 😀

How to convert JSON text into objects using C# [duplicate]

To create a class off a json string, copy the string. In Visual Studio, in the menu at the top, click Edit > Paste special > Paste Json as classes. Install Newtonsoft.Json via Nuget Paste the following code into your project, “jsonString” being the variable you want to deserialize : Rootobject r = Newtonsoft.Json.JsonConvert.DeserializeObject<Rootobject>(jsonString); Don’t …

Read more

gson invoking standard deserialization in custom deserializer

You can do that by implementing custom TypeAdapterFactory for your object (say CustomClass.class) to be deserialized as below. public class CustomTypeAdapterFactory implements TypeAdapterFactory { public final TypeAdapter create(Gson gson, TypeToken type) { return new TypeAdapter() { @Override public void write(JsonWriter out, Object value) throws IOException { JsonElement tree = delegate.toJsonTree(value); //add code for writing object …

Read more