/altjson

Alternative JSON is a fork of encoding/json with a couple of extra features added

Primary LanguageGoBSD 3-Clause "New" or "Revised" LicenseBSD-3-Clause

encoding/json: implement type override for serialization

The fork adds the following APIs:

	func (*Encoder) Register(f interface{})
	func (*Decoder) Register(f interface{})

where f is a function that determines serialization for a specific type and takes precedence over the MarshalJSON/UnmarshalJSON methods.

See: golang/go#5901

It is forked from this MR: https://go-review.googlesource.com/c/go/+/212998