Commit Graph

11 Commits

Author SHA1 Message Date
Sean Chittenden
20ef8cf57f
Return an error instead of printing stray illegal\n to stdout. 2017-04-20 16:09:49 -07:00
Mitchell Hashimoto
c03d57b578
json/parser: empty list value should not flatten
Fixes https://github.com/hashicorp/terraform/issues/8886

While parsing JSON, an empty list value would be assumed to be a
non-existent list of objects, and would be removed from the result. This
may have never been the correct behavior but always worked okay because
we previously didn't support lists as first class types.

With the support of lists, we need to actually return the empty list as
the type. If we return nothing, then projects like Terraform will think
that the value was never set, which is false.
2016-10-25 10:44:39 -07:00
Mitchell Hashimoto
6f5bfed9a0 Merge pull request #149 from Acconut/fix-missing-assign
json/parser: set Assign property when parsing object item
2016-10-08 15:35:57 +08:00
Marius
28370ddc98 json/parser: set Assign property when parsing object item 2016-09-05 21:46:43 +02:00
Mitchell Hashimoto
685b5f7416
json: verify that objects have keys [GH-128] 2016-06-21 12:57:45 -07:00
Mitchell Hashimoto
637d86c42d json/parser: can parse lists of objects 2015-11-08 16:28:18 -08:00
Mitchell Hashimoto
407a4ff94c json/parser: flatten 2015-11-08 16:20:34 -08:00
Mitchell Hashimoto
7ccda83497 json/parser: can parse multiple objects 2015-11-08 16:11:15 -08:00
Mitchell Hashimoto
340f0af3c0 json/token: fix issues with unquoting sttrings from JSON 2015-11-08 16:08:36 -08:00
Mitchell Hashimoto
cf0da81e50 Remove json files, add flatten.go to json/parse 2015-11-08 15:52:57 -08:00
Mitchell Hashimoto
f5a27d4be4 json/parser 2015-11-08 15:50:37 -08:00