Closed simoneruffini closed 1 year ago
Moreover with an incorrect json structure at the definition level (incorrectly written json) the application just ends with return code 146. Need more debug info. Try this json https://termbin.com/ejvl
It uses the default go/json parser and if you try parse a wrong json file, it returns an error. I've added the validation level for all the fields marked as "required" in the doc (remember: a required INT field which can be of value 0 can be omitted)
83cce40d7183ad39feb8fe2109c506ffe78e96f6
The returned information is a lot better but still the line number where the syntax is incorrect is not displayed. Is this fixable?
I found a work-around to get the line num of a json syntax and type errors. For the errors regarding the validation of the CAN models it's not possible to reference the line. If the convertion is dbc->json, the line is shown
If the json is incorrectly typed and run through
jsondbc
it returns no meaningful error on where the syntax is wrong. I need to pre parse the json withjq
to understand where the missing comma is.