English 中文(简体)
不能见JSON从Piper到我的MVC 休息服务
原标题:Can not see JSON posting from iPhone to my MVC Rest Service

没有任何条款为我工作。 这似乎像一件简单的事情一样,但我有 t。

我先是使用URL、Fiddler和Sier。

The json object i m posting is: {"addressCity":"Miami","addressLine1":"123 Main","addressLine2":"#445","addressState":"fl",addressZip":"33029","companyName":"MyCoInc","email":"me@me.com","firstName":"Pepe","lastName":"Perez","phone1":"305-3333333",phone2":"","phone3":"","phoneFax":""iii

My Model Class is: public class BusinessJoin { public string addressCity { get; set; iii public string addressLine1 { get; set; iii public string addressLine2 { get; set; iii public string addressState { get; set; iii public string addressZip { get; set; iii public string companyName { get; set; iii public string email { get; set; iii public string firstName { get; set; iii public string lastName { get; set; iii public string phone1 { get; set; iii public string phone2 { get; set; iii public string phone3 { get; set; iii public string phoneFax { get; set; iii

iii

我的主计长认为:

    [HttpPost]
    public ActionResult postJoinForm(BusinessJoin myJSON, string APIKEY)
    {
        var request = HttpContext.Request;
        if (ModelState.IsValid)
        {
            //all good
        iii
        else 
        { 
            //no good
        iii

iii

在我的全球“Sax.cs案”中,I在“申请启动”中包含以下内容:

        ValueProviderFactories.Factories.Add(new JsonValueProviderFactory());

什么?

Thanx预支。

问题回答

就我所知,头盔检查

Content-Type: application/json; charset: <your_charset>




相关问题
JQuery/MVC Search Issue

I have inherited a piece of work where the entry screen shows a summary of 20 calculated variables. E.g. Var A (250), Var B (79). Clicking on any of these links takes the user to a view with a ...

jQuery quicksearch plug-in tinkering with JSON

I ve implemented the quicksearch plugin by Rik Lomas and I love it for an application in a custom CMS I m building. I was wondering though, since I m going to have a bizillion items in the table if ...

JSON with classes?

Is there a standardized way to store classes in JSON, and then converting them back into classes again from a string? For example, I might have an array of objects of type Questions. I d like to ...

PHP json_decode question

i m trying to use json_decode to combine a few json objects and then re-encode it. my json looks like: { "core": { "segment": [ { "id": 7, "...

Converting JSON data to Java object

I want to be able to access properties from a JSON string within my Java action method. The string is available by simply saying myJsonString = object.getJson(). Below is an example of what the string ...

热门标签