You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Found a bug? You're welcome to
The parser available here is supposed to work with different file types, but it's throwing an error. Below are the details -
// parser
combinedParser, _ := parser.NewBuilder().
Add(&json.Parser{}).
Add(terraform.NewDefault()).
Build([]string{""}, []string{""})
// file content
content, _ := os.ReadFile("/Users/testworld/test.json")
// get the parser data
for _,p := range combinedParser {
parsedDocs, err := p.Parse("/Users/testworld/test.json", content)
if err != nil{
fmt.Println(err). // Here I am getting an error - Error: failed to parse file /Users/testworld/test.json: unsupported file to parse
}
}
Please make sure to:
Describe in details what the problem is
Attach a log file with relevant data preferably in DEBUG level (--log-level=DEBUG)
Attach the scanned sample files, anonymize the data if the original file cannot be provided
When attaching files to the issue make sure they are properly formatted
Expected Behavior
The parser should identify different file types and parse the file content accordingly. Please let me know if I need to use the parser differently.
Actual Behavior
Unable to parse different file types -
Error: failed to parse file /Users/testworld/test.json: unsupported file to parse
Steps to Reproduce the Problem
(Command line arguments and flags used)
step 1
step 2
step 3
Specifications
(N/A if not applicable)
Version:
Platform:
Subsystem:
The text was updated successfully, but these errors were encountered:
bigdatasourav
changed the title
bug: the parser is not working with different file types
bug(parser): the parser is not working with different file types
Aug 31, 2023
Found a bug? You're welcome to
The parser available here is supposed to work with different file types, but it's throwing an error. Below are the details -
--log-level=DEBUG
)Expected Behavior
The parser should identify different file types and parse the file content accordingly. Please let me know if I need to use the parser differently.
Actual Behavior
Unable to parse different file types -
Error: failed to parse file /Users/testworld/test.json: unsupported file to parse
Steps to Reproduce the Problem
(Command line arguments and flags used)
Specifications
(N/A if not applicable)
The text was updated successfully, but these errors were encountered: