json

App force close without internet JSON

im making an app using json on first activity but when the app is open without internet conection the app make a “force close”, i dont know what have to do to ovoid this error, help, im new on android and java public class MainActivity extends ActionBarActivity { String TITLES[] = {“Que es CMX”,”Ejecutivos(as)”,”Nuestros Servicios”,”Soluciones a tu Medida”,”Certificaciones Vigentes”, “Cursos…
Read more

Newtonsoft.Json: How can I map specific properties?

Imagine I have a class like this one: public class Foo { [JSonProperty(“a”)] public int a; [JSonProperty(“b”)] public int b; public List<Foo> foos; } and imagine I have a Json like this one: { “a”: “0”, “b”: “1”, “moreFoos”: { “total” : “2”, “foos” : [ { “a” : “2”, “b” : “3” }, { “a” : “4”, “b” :…
Read more