json-iterator / go

A high-performance 100% compatible drop-in replacement of "encoding/json"
http://jsoniter.com/migrate-from-go-std.html
MIT License
13.34k stars 1.02k forks source link

[Question] different type encoders for the same type #649

Open DigitalMarc opened 1 year ago

DigitalMarc commented 1 year ago

I have the requirement to serialize the same type in different formats depending on certain scenarios (REST API retrocompatibility). Is there is a way to do so?