()
| 510 | } |
| 511 | |
| 512 | func (j *jsonEncoded) mustDecode() JSON { |
| 513 | decoded, err := j.shallowDecode() |
| 514 | if err != nil { |
| 515 | panic(errors.NewAssertionErrorWithWrappedErrf(err, "invalid JSON data: %v", j.value)) |
| 516 | } |
| 517 | return decoded |
| 518 | } |
| 519 | |
| 520 | // decode should be used in cases where you will definitely have to use the |
| 521 | // entire decoded JSON structure, like printing it out to a string. |
no test coverage detected