diff options
Diffstat (limited to 'vendor/github.com/zclconf/go-cty/cty/json')
-rw-r--r-- | vendor/github.com/zclconf/go-cty/cty/json/type_implied.go | 7 | ||||
-rw-r--r-- | vendor/github.com/zclconf/go-cty/cty/json/unmarshal.go | 2 |
2 files changed, 4 insertions, 5 deletions
diff --git a/vendor/github.com/zclconf/go-cty/cty/json/type_implied.go b/vendor/github.com/zclconf/go-cty/cty/json/type_implied.go index 1a97306..0fa13f6 100644 --- a/vendor/github.com/zclconf/go-cty/cty/json/type_implied.go +++ b/vendor/github.com/zclconf/go-cty/cty/json/type_implied.go | |||
@@ -138,7 +138,7 @@ func impliedObjectType(dec *json.Decoder) (cty.Type, error) { | |||
138 | } | 138 | } |
139 | 139 | ||
140 | func impliedTupleType(dec *json.Decoder) (cty.Type, error) { | 140 | func impliedTupleType(dec *json.Decoder) (cty.Type, error) { |
141 | // By the time we get in here, we've already consumed the { delimiter | 141 | // By the time we get in here, we've already consumed the [ delimiter |
142 | // and so our next token should be the first value. | 142 | // and so our next token should be the first value. |
143 | 143 | ||
144 | var etys []cty.Type | 144 | var etys []cty.Type |
@@ -150,10 +150,9 @@ func impliedTupleType(dec *json.Decoder) (cty.Type, error) { | |||
150 | } | 150 | } |
151 | 151 | ||
152 | if ttok, ok := tok.(json.Delim); ok { | 152 | if ttok, ok := tok.(json.Delim); ok { |
153 | if rune(ttok) != ']' { | 153 | if rune(ttok) == ']' { |
154 | return cty.NilType, fmt.Errorf("unexpected delimiter %q", ttok) | 154 | break |
155 | } | 155 | } |
156 | break | ||
157 | } | 156 | } |
158 | 157 | ||
159 | ety, err := impliedTypeForTok(tok, dec) | 158 | ety, err := impliedTypeForTok(tok, dec) |
diff --git a/vendor/github.com/zclconf/go-cty/cty/json/unmarshal.go b/vendor/github.com/zclconf/go-cty/cty/json/unmarshal.go index 155f0b8..3810645 100644 --- a/vendor/github.com/zclconf/go-cty/cty/json/unmarshal.go +++ b/vendor/github.com/zclconf/go-cty/cty/json/unmarshal.go | |||
@@ -72,7 +72,7 @@ func unmarshalPrimitive(tok json.Token, t cty.Type, path cty.Path) (cty.Value, e | |||
72 | } | 72 | } |
73 | switch v := tok.(type) { | 73 | switch v := tok.(type) { |
74 | case string: | 74 | case string: |
75 | val, err := convert.Convert(cty.StringVal(v), t) | 75 | val, err := cty.ParseNumberVal(v) |
76 | if err != nil { | 76 | if err != nil { |
77 | return cty.NilVal, path.NewError(err) | 77 | return cty.NilVal, path.NewError(err) |
78 | } | 78 | } |