|
|
|
@@ -591,7 +591,7 @@ func Test_ObjectToJSON2(t *testing.T) { |
|
|
|
union := types.NewTypeUnion[Base](&St1{}, St2{}) |
|
|
|
UseTypeUnionExternallyTagged(&union) |
|
|
|
|
|
|
|
var val []Base = []Base{ |
|
|
|
var val = []Base{ |
|
|
|
&St1{Val: "asd", Type: "St1"}, |
|
|
|
St2{Val: 123, Type: "St2"}, |
|
|
|
} |
|
|
|
@@ -607,7 +607,7 @@ func Test_ObjectToJSON2(t *testing.T) { |
|
|
|
union := types.NewTypeUnion[Base](&St1{}, St2{}) |
|
|
|
UseTypeUnionInternallyTagged(&union, "Type") |
|
|
|
|
|
|
|
var val []Base = []Base{ |
|
|
|
var val = []Base{ |
|
|
|
&St1{Val: "asd", Type: "St1"}, |
|
|
|
St2{Val: 123, Type: "St2"}, |
|
|
|
} |
|
|
|
@@ -623,7 +623,7 @@ func Test_ObjectToJSON2(t *testing.T) { |
|
|
|
union := types.NewTypeUnion[Base](&St1{}, St2{}) |
|
|
|
UseTypeUnionExternallyTagged(&union) |
|
|
|
|
|
|
|
var val []Base = []Base{ |
|
|
|
var val = []Base{ |
|
|
|
nil, |
|
|
|
} |
|
|
|
data, err := ObjectToJSONEx(val) |
|
|
|
@@ -638,7 +638,7 @@ func Test_ObjectToJSON2(t *testing.T) { |
|
|
|
union := types.NewTypeUnion[Base](&St1{}, St2{}) |
|
|
|
UseTypeUnionInternallyTagged(&union, "Type") |
|
|
|
|
|
|
|
var val []Base = []Base{ |
|
|
|
var val = []Base{ |
|
|
|
nil, |
|
|
|
} |
|
|
|
data, err := ObjectToJSONEx(val) |
|
|
|
|