Created
May 5, 2013 15:46
-
-
Save sidravic/5521194 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// This will parse your JSON | |
type APIResponse struct{ | |
StatusCode string `json:"status_code"` | |
OperationStatus bool `json:"status"` | |
Errors string `json:"error_messages, omitempty"` | |
ApplicationID string `json:"application_id, omitempty"` | |
QueueID int64 `json:"queue_id, omitempty"` | |
} | |
// 1 hour later I realized this won't return parsed values but defaults for the data types | |
type APIResponse struct{ | |
StatusCode string `json: "status_code"` | |
OperationStatus bool `json: "status"` | |
Errors string `json: "error_messages, omitempty"` | |
ApplicationID string `json: "application_id, omitempty"` | |
QueueID int64 `json: "queue_id, omitempty"` | |
} | |
// The extra whitespace after the colon may seem trivial but its not. | |
// |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment