Float returns a byte slice containing the value of the json number that the tokenizer is currently pointing at. This method must only be called after checking the kind of the token via a call to Kind. If the tokenizer is not positioned on a number, the behavior is undefined.
()
| 278 | // |
| 279 | // If the tokenizer is not positioned on a number, the behavior is undefined. |
| 280 | func (t *Tokenizer) Float() float64 { |
| 281 | f, _ := strconv.ParseFloat(*(*string)(unsafe.Pointer(&t.Value)), 64) |
| 282 | return f |
| 283 | } |
| 284 | |
| 285 | // String returns a byte slice containing the value of the json string that the |
| 286 | // tokenizer is currently pointing at. |