1

I am trying to send JsonArray in Post web service. The structure of the Json is similar like

{
    "TestObject": {
        "SomeText": "Blah",
        "SomeEmptyArray": [{
            "SomeNumber": 42,
            "SomeBool": true,
            "SomeNull": null
        }, {
            "SomeNumber": 42,
            "SomeBool": true,
            "SomeNull": null
        }, {
            "SomeNumber": 42,
            "SomeBool": true,
            "SomeNull": null
        } ]
    }
}

I am able to send Simple JsonObject in Web services through:

WWWForm form = new WWWForm();
form.AddField("numpoints", numpoints);
form.AddField("color", color);
form.AddField("backgroundcolor", backgroundcolor);
form.AddField("stmSize", stmSize);

But not able to send JsonArray in this.

I have checked this link

[https://stackoverflow.com/questions/46003824/sending-http-requests-in-c-sharp-with-unity][1]

But I don't find any way to create JsonArray here...

Himanshu Shekher Jha
  • 1,334
  • 2
  • 14
  • 27
  • I dislike when people change their question to another thing through the edit button. You originally requested how to send a json to a web service. You got the answer then edited it to say "how to create json array". Don't do stuff like that. Just create a new question. Anyways, [this](https://stackoverflow.com/questions/36239705/serialize-and-deserialize-json-and-json-array-in-unity/36244111?s=1|2.8840#36244111) is how to create json array. – Programmer Sep 20 '17 at 12:20
  • I have not updated my Question title, Just added 3 line in the bottom part. – Himanshu Shekher Jha Sep 21 '17 at 07:53
  • Thanks for your Link. But I have already solved this issue yesterday with a similar approach. – Himanshu Shekher Jha Sep 21 '17 at 08:01
  • Thanks for your Link. But I have already solved this issue yesterday with a similar approach. – Himanshu Shekher Jha Sep 21 '17 at 08:03

0 Answers0