0

I am working on an application for iOS which needs to synchronize data between multiple users and one web server. I did some research and the best solution I found for this is working with JSON. At the moment I have a .json file on a web server and I am able to download the data to my iphone app and parse it. I have two problems I didn't manage to understand yet: 1. How can each iphone user write back data to the json file on the server? 2. How can I take a data table and automaticly convert it to a .json file? so the .json file on the server will be updated every few minutes or so...

I'll appreciate any help with this!

Brian Tompsett - 汤莱恩
  • 5,753
  • 72
  • 57
  • 129
Itai Caspi
  • 39
  • 1
  • 9

1 Answers1

0

You dont send JSON file as afile to the devices, you send a JSON request, I advice to do more reading about this topic, you can start from below:

Working with JSON in iOS 5 Tutorial

enter link description How to make HTTP request from iPhone and parse JSON result

How to fetch and parse JSON by using data models

and read this SO question:

iPhone/iOS JSON parsing tutorial

How to sent JSON request in the Post method in iPhone?

How to send json data in the Http request using NSURLRequest

Community
  • 1
  • 1
Tarek Hallak
  • 18,422
  • 7
  • 59
  • 68
  • Thanks for your answer... I already visited all this websites. My problem is not the fetching or the parsing. My problem is how to send data back to the server. I want the json file to include how many times users "liked" a certain data object. – Itai Caspi Aug 11 '13 at 19:10
  • Ok but you can send the JSON to your server as a POST, and take it in your backend as a JSON response (maybe using jQuery) but not as a JSON physical file, are we at the same track or I didn't get you? coz I am using JSON and PHP backend in most of my apps. – Tarek Hallak Aug 11 '13 at 19:23
  • I think the post message is what I need. i'll check out more about it. – Itai Caspi Aug 11 '13 at 20:12