Created
December 21, 2018 19:01
-
-
Save mlh758/27f26c7154bd76c69f025e9305cea816 to your computer and use it in GitHub Desktop.
Minimum Test Case
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
package main | |
import ( | |
"encoding/json" | |
"log" | |
) | |
const j = `{ | |
"expectation": "Verbalizes understanding", | |
"description": "Home Medication Administration Plan", | |
"duration": null, | |
"duration_unit": null, | |
"offset_qty": "0.0", | |
"offset_unit": null, | |
"concept_cki": null | |
}` | |
type outcome struct { | |
Duration int | |
DurationUnit string `json:"duration_unit"` | |
Description string `json:"description"` | |
Expectation string | |
OffsetQty string `json:"offset_qty"` | |
OffsetUnit string `json:"offset_unit"` | |
} | |
func main() { | |
var o outcome | |
json.Unmarshal([]byte(j), &o) | |
log.Print(o) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment