0

我确实有一个包含一些属性的 json 字符串。

看起来像这样的json:

2013-06-26 14:59:06.363 DesignTable[1772:c07] {
  "Table" : {
    "Table name" : "F",
    "Number of Seats" : "4",
    "tableLocation" : {
      "y coordinate" : "141.00",
      "x coordinate" : "347.50"
    }
  }
}
2013-06-26 14:59:06.363 DesignTable[1772:c07] {
  "Table" : {
    "Table name" : "G",
    "Number of Seats" : "4",
    "tableLocation" : {
      "y coordinate" : "255.50",
      "x coordinate" : "360.50"
    }
  }
}

我如何将其发布到网络服务并将其发布到数据库?

4

2 回答 2

0

如果你不只是在谈论 json,而是在谈论一般的休息,那么看看 RestKit:http: //restkit.org/ 这里有一个很好的教程: http ://www.raywenderlich.com/13097/intro- to-restkit-教程

于 2013-06-26T08:26:11.443 回答
0

您可以为此使用 ASIHTTP。

    NSURL *url = [NSURL URLWithString:BASE_URL];
    ASIFormDataRequest *request = [ASIFormDataRequest requestWithURL:url];
    request.tag = 666;
    request.delegate = self;
    request.timeOutSeconds = 200;
    [request setRequestMethod:@"POST"];


    [request setPostValue:@"YourData" forKey:@"your_key"];

    [request startAsynchronous];

这可以帮助你....

于 2013-06-26T08:35:42.387 回答