I am working with an webapplication which recieves data from iphone and then save it in the database. Data sent by iphone is in json format. I want to parse that json object and make an object with same attributes in my we application. for that i am using fromJson(Reader json, Class<T> classOfT)
function. Is it possible to make a json file in my web application and then use that file as input of web application instead of sending data from iphone app again and again. If it is then where should i create that json file and how should i access that in fromJson(Reader json, Class<T> classOfT)
function.
For example:
{
users:[{
name: "name1",
email: "email1",
friends:[{
name: "name2",
email: "email2",
friends:[{
name: "name3",
email: "email3"
},
{
name: "name4",
email: "email4"
}]
}]
}]
}
Its a json object iphone app sends. I want this object hardcoded in my webapplication so i will not need to send it again and again from iphone app. I hope now its more clear.
Thanks in advance