Add custom serializer option
See original GitHub issueCurrently JSONB.stringify/JSONB.parse is used for serializing/deserializing to support a wide range JavaScript Types.
Allowing users to set a custom a custom serializer function will allow for cleaner usage with custom data structures and enable performance improvements for people who don’t need all the type support JSONB provides.
Syntax should look something like:
const Keyv = require('keyv');
const { serialize, deserialize } = require('my-serializer');
const keyv = new Keyv({ serialize, deserialize });
Previous discussion in #22
Issue Analytics
- State:
- Created 6 years ago
- Comments:10
Top Results From Across the Web
How to write custom converters for JSON serialization - .NET
This article shows how to create custom converters for the JSON serialization classes that are provided in the System.Text.Json namespace.
Read more >Custom JSON serializer for optional property with System.Text ...
Json , your only option to conditionally omit optional properties without a value is to ... Here is one attempt to create such...
Read more >Custom JSON Serialisation with System.Text.Json Converters
We first get the actual type of the object. With this in hand, we can call an overload of Serialize which accepts the...
Read more >System.Text.Json - How to customize serialization with ...
To use this custom converter, you add it to JsonSerializarOptions.Converters, then pass the options in when you're using JsonSerializer, ...
Read more >Serializers - Django REST framework
You can specify custom field-level validation by adding .validate_<field_name> methods to your Serializer subclass.
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

Or to a rabbit on the internet.
Closed by https://github.com/lukechilds/keyv/pull/33