This expression yields null for str:
var jsi = jsoniter.ConfigCompatibleWithStandardLibrary
str, err := jsi.Marshal(json.RawMessage(`1234`))
The issue seems to be with the ValidateJsonRawMessage flag, because it works as expected for a direct jsoniter.Marshal. This only seems to be a problem for numbers; all other data types I've tried are fine (including objects or arrays which contain numbers).
Reproducer: https://play.golang.org/p/RKEy97ZLrn-