encoding/json: handle encoding.ScalarMarshaler and encoding.ScalarUnmarshaler
Per discussion on https://go.dev/issue/56235, Marshal checks for ScalarMarshaler strictly
after TextMarshaler, and Unmarshal delegates to TextUnmarshaler or
ScalarUnmarshaler according to whether the corresponding JSON value is a
string, Boolean, or number. Neither function handles a complex128 type
argument to the interfaces.
ScalarMarshaler
andScalarUnmarshaler
interfaces were added to the encoding package in golang/go:Description from https://go-review.googlesource.com/c/go/+/553176