Commit Graph

11 Commits

Author SHA1 Message Date
Mitchell Hashimoto
352bb4b5e3
hcl/parser: don't allow objects with no keys 2016-06-21 13:07:06 -07:00
Mitchell Hashimoto
685b5f7416
json: verify that objects have keys [GH-128] 2016-06-21 12:57:45 -07:00
Sander van Harmelen
cf83c24abf Fix flattening of empty objects 2015-11-20 17:56:37 +01:00
Sander van Harmelen
2f117c801c This fixes a bug in the flattener so that objects are flattened as one list object 2015-11-19 17:42:55 +01:00
Fatih Arslan
d45f5d133c ast: change signature of Walk() to allow rewriting AST
With the previous Walk function it's not easy to rewrite the node as we
don't have any kind of reference to the parent. If we want to rewrite a
given AST, we have to manually traverse it as Walk is not usable. To
allow us rewriting the AST we change the signature of the function
passed to Walk. It'll allow us to rewrite the AST and return back.
Internally Walk() overrides the returned AST.

This idea was also talked here:
https://groups.google.com/forum/#!topic/golang-nuts/cRZQV36IckM
extensively.
2015-11-14 21:58:31 +02: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