Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for custom encoder function? #404

Closed
benallfree opened this issue Sep 23, 2022 · 0 comments
Closed

Support for custom encoder function? #404

benallfree opened this issue Sep 23, 2022 · 0 comments

Comments

@benallfree
Copy link

Hi, I'm very new to Go so I apologize if this is an ignorant request.

Is there a way, using this lib or some other, to implement a custom value encoder?

In JS, JSON.stringify accepts an optional encoder parameter:

const encode = (key:string, value:any)=>{
   // inspect the type of `value` and return whatever you want
}

Is there anything similar for Go?

@goccy goccy closed this as completed Nov 15, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants