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