Skip to content

Commit ae0f005

Browse files
committed
comments
1 parent 8bd98fc commit ae0f005

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

dbos/serialization.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,6 @@ func serialize(ctx DBOSContext, data any) (string, error) {
6666
return dbosCtx.serializer.Encode(data)
6767
}
6868

69-
// isJSONSerializer checks if the given serializer is a JSONSerializer
7069
func isJSONSerializer(s Serializer) bool {
7170
_, ok := s.(*JSONSerializer)
7271
return ok
@@ -78,6 +77,7 @@ func isJSONSerializer(s Serializer) bool {
7877
// This is needed because JSON deserialization loses type information when decoding
7978
// into `any` - it converts structs to map[string]interface{}, numbers to float64, etc.
8079
// By re-marshaling and unmarshaling into a typed target, we (mostly) restore the original structure.
80+
// We should be able to get ride of this when we lift encoding/decoding outside of the system database.
8181
func convertJSONToType[T any](value any) (T, error) {
8282
if value == nil {
8383
return *new(T), nil

0 commit comments

Comments
 (0)