title: How to convert dictionary to json string without space and new line
body: <p>I am trying to convert a dictionary to json string without space and new line. I tried to use JSONSerialization.jsonObject but I still can see spaces and new lines. Is there any way to have a string result looks something like this </p>
  
  <pre><code>"data": "{\"requests\":[{\"image\":{\"source\":{\"imageUri\":\"https://www.google.com/images/branding/googlelogo/2x/googlelogo_color_272x92dp.png\"}},\"features\":[{\"type\":\"LOGO_DETECTION\",\"maxResults\":1}]}]}"
  </code></pre>
  
  <p>My conversion</p>
  
  <pre><code>var features = [[String: String]]()
  for detection in detections {
      features.append(["type": imageDetection[detection]!])
  }
  let content = ["content": base64Image]
  let request = ["image": content, "features": features] as [String : Any]
  let requests = ["requests": [request]]
  
  let jsonData = try! JSONSerialization.data(withJSONObject: requests, options: .prettyPrinted)
  let decoded = try! JSONSerialization.jsonObject(with: jsonData, options: [])
  print(decoded)
  </code></pre>
  
  <p>Result</p>
  
  <pre><code>{
      requests =     (
                  {
              features =             (
                                  {
                      type = "LABEL_DETECTION";
                  },
                                  {
                      type = "WEB_DETECTION";
                  },
                                  {
                      type = "TEXT_DETECTION";
                  }
              );
              image =             {
                  content = "iVBO
        ...........
  </code></pre>