title: How to convert JSON string to struct
body: <p>I have start working in golang, I am trying to parse JSON string to struct but its not working.</p>
  
  <p><strong>JSON String:</strong></p>
  
  <blockquote>
    <p>dailies":[{"userAccessToken":"acessToken","uploadStartTimeInSeconds":1499744832,"uploadEndTimeInSeconds":1499744832,"callbackURL":"callbackurl"}]}</p>
  </blockquote>
  
  <pre><code>type pingDataFormat struct {
      userAccessToken          string
      uploadStartTimeInSeconds int
      uploadEndTimeInSeconds   int
      callbackURL              string 
  }
  </code></pre>
  
  <p>Below is code which convert JSON String to structs</p>
  
  <pre><code>pingJSON := make(map[string][]pingDataFormat)
  
  err := json.Unmarshal([]byte(pingData), &amp;pingJSON)
  
  if err != nil {
      panic(err)
  }
  
  fmt.Printf("\n\n json object:::: %v", pingJSON)
  </code></pre>
  
  <p><strong>output is:</strong></p>
  
  <blockquote>
    <p>json object:::: map[dailies:[{ 0 0 }]]</p>
  </blockquote>
  
  <p>Here "dailies" dont have data, So do i following right approach to parse and how to get data after parse?</p>