std.json: avoid stale pointers when parsing Value (#16864)

Closes #16861

Using `alloc_if_needed` when parsing a `Value` allows receiving a token
which points to the buffer of the underlying `Reader`. This token will
no longer be valid after the `Reader`'s buffer is refilled, which will
happen with large values. Using `alloc_always` avoids this issue by
ensuring the returned tokens always own their data independently of the
underlying buffer.
f3f554b9b8Ian Johnson committed on 8/17/2023, 11:52:46 AM· committed by GitHubparent5395c27
2 files changedLine totals unavailable