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

Feature request: ability to use customized json marshaler #48

Open
povsister opened this issue Jul 27, 2021 · 0 comments
Open

Feature request: ability to use customized json marshaler #48

povsister opened this issue Jul 27, 2021 · 0 comments

Comments

@povsister
Copy link

When a type is not recognized, SJSON will fallback to the encoding/json Marshaller.

The standard json library doesn't support type registration, so it's not very ideal to handle complex or customized struct marshaling.
I'd like to have a package level variable in sjson holding a global json marshaler which will be used when a type is not recognized.
Or, we can add a new option in SetOptions specifying the marshaler used for this Set call ?
I prefer the former way, maybe we can add them both ?

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

1 participant