https://github.com/djdeveloperr/serde_to_v8
Converts Serde `Value` to v8 binary format.
https://github.com/djdeveloperr/serde_to_v8
Last synced: 11 months ago
JSON representation
Converts Serde `Value` to v8 binary format.
- Host: GitHub
- URL: https://github.com/djdeveloperr/serde_to_v8
- Owner: DjDeveloperr
- License: apache-2.0
- Created: 2021-08-21T11:14:52.000Z (over 4 years ago)
- Default Branch: main
- Last Pushed: 2021-08-22T02:54:51.000Z (over 4 years ago)
- Last Synced: 2025-01-22T02:35:33.628Z (about 1 year ago)
- Language: JavaScript
- Size: 34.2 KB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
Note: I'm no longer working on this project because WASM-based JSON deserialization came out to be lot slower.
# serde_to_v8
Converts serde_json `Value` to v8 binary format.
Why?
I was working with JS's built-in `JSON.parse`. It has no way to have key conversions, as I wanted snake_case keys to be convered to camelCase at parser-level. So I decided to instead translate untyped serde_json::Value to v8's binary serialization format which matches nearly the performance of v8's JSON parser.
## TODO/Ideas
- Maybe remove `wasm_bindgen` dependency and play with WASM at low level?
- Maybe write custom case-conversion function instead of using a dep?
- Maybe a custom JSON parser solely for translating to v8 binary?
## License
[Apache 2.0](./LICENSE)
Copyright 2021 @ DjDeveloperr