Swift Use array in Json : <p>When I add an array in my JSON object and convert it to JSON, after printing there is parenthesis instead of curly brace.</p>

<pre><code>var jsonObject : [String: Any] = [:]

var x = [1,2,3,4]
jsonObject["arr"] = x
do{
    let jsonData = try JSONSerialization.data(withJSONObject: jsonObject, options: [])

    let decoded = try JSONSerialization.jsonObject(with: jsonData, options: [])
    print(decoded)
} ...
</code></pre>

<p>And the result of printing: </p>

<pre><code>{
arr = (
      1,
      2,
      3,
      4
     );
}
</code></pre>

<p>But in JSON, to show an array it uses [ instead of (.</p>

<p>What's wrong? </p>
