We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 7ba104c commit 97f622bCopy full SHA for 97f622b
cue/types.go
@@ -911,7 +911,7 @@ func (v Value) MarshalJSON() (b []byte, err error) {
911
func (v Value) marshalJSON() (b []byte, err error) {
912
v, _ = v.Default()
913
if v.v == nil {
914
- return internaljson.Marshal(nil)
+ return []byte("null"), nil
915
}
916
ctx := newContext(v.idx)
917
x := v.eval(ctx)
@@ -926,7 +926,7 @@ func (v Value) marshalJSON() (b []byte, err error) {
926
// TODO: implement marshalles in value.
927
switch k := x.Kind(); k {
928
case adt.NullKind:
929
930
case adt.BoolKind:
931
return internaljson.Marshal(x.(*adt.Bool).B)
932
case adt.IntKind, adt.FloatKind, adt.NumberKind:
0 commit comments