(str string)
| 18 | ) |
| 19 | |
| 20 | func EncodeString(str string) *commonpb.Payload { |
| 21 | // Error can be safely ignored here because string always can be converted to JSON |
| 22 | p, _ := defaultDataConverter.ToPayload(str) |
| 23 | return p |
| 24 | } |
| 25 | |
| 26 | func EncodeBytes(bytes []byte) *commonpb.Payload { |
| 27 | // Error can be safely ignored here because []byte always can be raw encoded |