(ctx *ReadContext, refMode RefMode, readType bool, hasGenerics bool, value reflect.Value)
| 149 | } |
| 150 | |
| 151 | func (s stringSerializer) Read(ctx *ReadContext, refMode RefMode, readType bool, hasGenerics bool, value reflect.Value) { |
| 152 | err := ctx.Err() |
| 153 | if refMode != RefModeNone { |
| 154 | // String is non-primitive, needs ref flag |
| 155 | refFlag := ctx.buffer.ReadInt8(err) |
| 156 | if refFlag == NullFlag { |
| 157 | value.SetString("") |
| 158 | return |
| 159 | } |
| 160 | } |
| 161 | if readType && !ctx.readExpectedTypeID(STRING) { |
| 162 | return |
| 163 | } |
| 164 | if ctx.HasError() { |
| 165 | return |
| 166 | } |
| 167 | s.ReadData(ctx, value) |
| 168 | } |
| 169 | |
| 170 | func (s stringSerializer) ReadWithTypeInfo(ctx *ReadContext, refMode RefMode, typeInfo *TypeInfo, value reflect.Value) { |
| 171 | s.Read(ctx, refMode, false, false, value) |
no test coverage detected