ParsedString returns the string value for a JSON string token or the read value in string if token is not a string.
()
| 113 | // ParsedString returns the string value for a JSON string token or the read |
| 114 | // value in string if token is not a string. |
| 115 | func (t Token) ParsedString() string { |
| 116 | if t.kind == String { |
| 117 | return t.str |
| 118 | } |
| 119 | panic(fmt.Sprintf("Token is not a String: %v", t.RawString())) |
| 120 | } |
| 121 | |
| 122 | // Float returns the floating-point number if token kind is Number. |
| 123 | // |