1
0
Fork 0
mirror of https://github.com/denoland/deno.git synced 2024-12-27 09:39:08 -05:00
denoland-deno/core/examples
Jared Beller b50691efed
refactor(core): Strongly typed deserialization of JSON ops (#9423)
This PR makes json_op_sync/async generic to all Deserialize/Serialize types
instead of the loosely-typed serde_json::Value. Since serde_json::Value
implements Deserialize/Serialize, very little existing code needs to be updated,
however as json_op_sync/async are now generic, type inference is broken in some
cases (see cli/build.rs:146). I've found this reduces a good bit of boilerplate,
as seen in the updated deno_core examples.

This change may also reduce serialization and deserialization overhead as serde
has a better idea of what types it is working with. I am currently working on
benchmarks to confirm this and I will update this PR with my findings.
2021-02-13 11:56:56 -05:00
..
hello_world.rs refactor(core): Strongly typed deserialization of JSON ops (#9423) 2021-02-13 11:56:56 -05:00
http_bench_bin_ops.js update copyright to 2021 (#9081) 2021-01-10 21:59:07 -05:00
http_bench_bin_ops.rs update copyright to 2021 (#9081) 2021-01-10 21:59:07 -05:00
http_bench_json_ops.js refactor(core): Strongly typed deserialization of JSON ops (#9423) 2021-02-13 11:56:56 -05:00
http_bench_json_ops.rs refactor(core): Strongly typed deserialization of JSON ops (#9423) 2021-02-13 11:56:56 -05:00