Compare commits

...

2 Commits

Author SHA1 Message Date
8bf3a337cf v0.0.422
All checks were successful
Build Docker and Deploy / Run goext test-suite (push) Successful in 1m29s
2024-03-23 20:29:46 +01:00
16146494dc v0.0.421
Some checks failed
Build Docker and Deploy / Run goext test-suite (push) Failing after 32s
2024-03-23 20:28:51 +01:00
2 changed files with 3 additions and 17 deletions

View File

@@ -3,19 +3,9 @@ package dataext
import (
"encoding/json"
"errors"
"gogs.mikescher.com/BlackForestBytes/goext/langext"
)
type JsonTwoWayMarshal interface {
json.Marshaler
json.Unmarshaler
}
type JsonOptType interface {
JsonTwoWayMarshal | ~string | ~bool | langext.NumberConstraint
}
type JsonOpt[T JsonOptType] struct {
type JsonOpt[T any] struct {
isSet bool
value T
}
@@ -26,10 +16,6 @@ func (m JsonOpt[T]) MarshalJSON() ([]byte, error) {
return []byte("null"), nil // actually this would be undefined - but undefined is not valid JSON
}
if m.value == nil {
return []byte("null"), nil
}
return json.Marshal(m.value)
}

View File

@@ -1,5 +1,5 @@
package goext
const GoextVersion = "0.0.420"
const GoextVersion = "0.0.422"
const GoextVersionTimestamp = "2024-03-23T18:01:41+0100"
const GoextVersionTimestamp = "2024-03-23T20:29:46+0100"