Skip to content

Commit 9de5088

Browse files
fix float serialization
1 parent ecfb99d commit 9de5088

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

pkg/valueshim/tftype_json.go

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -76,8 +76,7 @@ func jsonMarshalNumber(v tftypes.Value, typ tftypes.Type, p *tftypes.AttributePa
7676
if err != nil {
7777
return nil, p.NewError(err)
7878
}
79-
f64, _ := n.Float64()
80-
return f64, nil
79+
return json.Number(n.Text('f', -1)), nil
8180
}
8281

8382
func jsonMarshalBool(v tftypes.Value, typ tftypes.Type, p *tftypes.AttributePath) (interface{}, error) {

0 commit comments

Comments
 (0)