json.WriteObject(stream, people); szJson = Encoding.UTF8.GetString(stream.ToArray()); } //反序列化 using (MemoryStream ms = new MemoryStream(Encoding.UTF8.GetBytes(szJson))) { DataContractJsonSerializer serializer = new DataContractJsonSerializer(typeof(People)); People _people = (People)ser...
即上面的 jsonStr,如何定義才能返回給前端? 嘗試使用過Any,發(fā)現(xiàn)不行(Any的“風評”很不好,介紹時一般和one of出現(xiàn)在一起) 幾經(jīng)探求,發(fā)現(xiàn)這種情況該用Struct(或說Value)類型 [Is "google/protobuf/struct.proto" the best way to send dynamic JSON over GRPC?](stackoverflow.com/questions "Is "google/pro...