Closed ivanjaros closed 1 year ago
I think we had the JSONPB marhsaller overriding because that was the only way to get into compliance with the JSON mapping standard with the old API, however, since the newer API provides protojson
and follows the standards, and accounts for WKT, there’s no need to provide a way to override how to marshal/unmarshal to JSON.
Since it’s standardized, we need to follow the standard.
+1 to what puellanivis said. The standard way is to implement protoreflect.Message
and use protojson
to render it to JSON. I'm closing this. Feel free to re-open, if this didn't address your question.
So this library now recommends to switch to google's implementation, which is ok with me. But the problem is that this library has
but the Google library does not. So what is the migration path in this case? The note
// Deprecated: Custom types should implement protobuf reflection instead.
is quite useless because it does not say anything useful.