Skip to content

Add JSON output protocal #23

@ChuckJonas

Description

@ChuckJonas

Wondering what the thought is behind all the non-json elements in the response files?

RESULT=FAILURE
#SECTION START: ERROR LIST
ERROR: {"filePath":"/Users/jonas/Documents/code/apex-autocomplete/bin/tmp2.cls","line":48,"column":8,"text":"mismatched input '}' expecting {'instanceof', '(', '[', ';', '.', '=', '>', '<', '?', '==', '<=', '>=', '!=', '&&', '||', '++', '--', '+', '-', '*', '/', '&', '|', '^', '%', '+=', '-=', '*=', '/=', '&=', '|=', '^=', '%=', '<<=', '>>=', '>>>='}"}
#SECTION END: ERROR LIST

It's somewhat of a pain as I have to preprocess the file to remove these lines before passing it through JSON.parse

Seems like a completely JSON structure would be more machine readable. You could include these elements in the structure if they are needed.

{
   success:false,
   errorList:[
     {"filePath":"/src/classes/tmp.cls","line":48,"column":8,"text":"mismatched input '}' expecting {'instanceof', '(', '[', ';', '.', '=', '>', '<', '?', '==', '<=', '>=', '!=', '&&', '||', '++', '--', '+', '-', '*', '/', '&', '|', '^', '%', '+=', '-=', '*=', '/=', '&=', '|=', '^=', '%=', '<<=', '>>=', '>>>='}"}
  ]
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions