Turbopack: Avoid `serde_json::RawValue` conversions in a few places (#97713)
[`RawValue::from_string`](https://docs.rs/serde_json/latest/serde_json/value/struct.RawValue.html#method.from_string) attempts to deserialize values to ensure they're valid JSON. The original version of this PR used [`RawValue::from_string_unchecked`](https://docs.rs/serde_json/latest/serde_json/value/struct.RawValue.html#method.from_string_unchecked), which introduced some `unsafe` usage to avoid the parse. Luke's comments revealed some better approaches. For `pages_chunk_group_bootstrap_params`, we're also able to avoid a string copy by using `RcJsonRawValue` and serializing a `&RawValue` instead of a `Box<RawValue>`.
Showing
Please
register
or
sign in
to comment