diff --git a/pkg/expr/expr_types.go b/pkg/expr/expr_types.go index eb7b709e1..d643de0d9 100644 --- a/pkg/expr/expr_types.go +++ b/pkg/expr/expr_types.go @@ -3,6 +3,7 @@ package expr import ( "bytes" "context" + "encoding/json" "fmt" "github.com/cortezaproject/corteza-server/pkg/errors" "github.com/cortezaproject/corteza-server/pkg/handle" @@ -144,6 +145,10 @@ func (t Array) Select(k string) (TypedValue, error) { } } +func (t ID) MarshalJSON() ([]byte, error) { + return json.Marshal(fmt.Sprintf("%d", t.value)) +} + func CastToBoolean(val interface{}) (out bool, err error) { return cast.ToBoolE(UntypedValue(val)) }