title: Create JSON in swift
body: <p>I need to create JSON like this:</p>
  
  <pre><code>Order = {   type_id:'1',model_id:'1',
  
     transfer:{
       startDate:'10/04/2015 12:45',
       endDate:'10/04/2015 16:00',
       startPoint:'Ул. Момышулы, 45',
       endPoint:'Аэропорт Астаны'
     },
     hourly:{
       startDate:'10/04/2015',
       endDate:'11/04/2015',
       startPoint:'ЖД Вокзал',
       endPoint:'',
       undefined_time:'1'
     },
     custom:{
       startDate:'12/04/2015',
       endDate:'12/04/2015',
       startPoint:'Астана',
       endPoint:'Павлодар',
       customPrice:'50 000'
     },
      commentText:'',
      device_type:'ios'
  };
  </code></pre>
  
  <p>The problem is that I can not create valid JSON. 
  Here is how I create object: </p>
  
  <pre><code>let jsonObject: [AnyObject]  = [
          ["type_id": singleStructDataOfCar.typeID, "model_id": singleStructDataOfCar.modelID, "transfer": savedDataTransfer, "hourly": savedDataHourly, "custom": savedDataReis, "device_type":"ios"]
      ]
  </code></pre>
  
  <p>where <code>savedData</code> are dictionaries:</p>
  
  <pre><code>let savedData: NSDictionary = ["ServiceDataStartDate": singleStructdata.startofWork, 
  "ServiceDataAddressOfReq": singleStructdata.addressOfRequest, 
  "ServiceDataAddressOfDel": singleStructdata.addressOfDelivery, 
  "ServiceDataDetailedText": singleStructdata.detailedText, "ServiceDataPrice": singleStructdata.priceProposed]
  </code></pre>
  
  <p>When I use only strings creating my JSON object everything works fine. However when I include dictionaries <code>NSJSONSerialization.isValidJSONObject(value)</code> returns <code>false</code>. How can I create a valid dictionary?</p>