Skip to content

Commit

Permalink
replace parse with new json parser
Browse files Browse the repository at this point in the history
  • Loading branch information
mitchellh committed Nov 8, 2015
1 parent cf0da81 commit b3a9867
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions parse.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (

"github.com/hashicorp/hcl/hcl/ast"
hclParser "github.com/hashicorp/hcl/hcl/parser"
"github.com/hashicorp/hcl/json"
jsonParser "github.com/hashicorp/hcl/json/parser"
)

// Parse parses the given input and returns the root object.
Expand All @@ -16,7 +16,7 @@ func Parse(input string) (*ast.File, error) {
case lexModeHcl:
return hclParser.Parse([]byte(input))
case lexModeJson:
return json.Parse(input)
return jsonParser.Parse([]byte(input))
}

return nil, fmt.Errorf("unknown config format")
Expand Down

0 comments on commit b3a9867

Please sign in to comment.