This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 258363 - Disable "Error parsing file" for specific .json files
Summary: Disable "Error parsing file" for specific .json files
Status: NEW
Alias: None
Product: javascript
Classification: Unclassified
Component: JSON (show other bugs)
Version: 8.1
Hardware: PC Windows 7
: P3 normal (vote)
Assignee: Petr Pisl
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-03-14 18:33 UTC by ron_butler
Modified: 2016-07-27 20:42 UTC (History)
0 users

See Also:
Issue Type: ENHANCEMENT
Exception Reporter:


Attachments
IDE log (65.66 KB, text/plain)
2016-03-14 18:33 UTC, ron_butler
Details

Note You need to log in before you can comment on or make changes to this bug.
Description ron_butler 2016-03-14 18:33:27 UTC
Product Version = NetBeans IDE 8.1 (Build 201510222201)
Operating System = Windows 7 version 6.1 running on amd64
Java; VM; Vendor = 1.8.0_73
Runtime = Java HotSpot(TM) 64-Bit Server VM 25.73-b02

Reproducibility: Happens every time

My team is working on a Netbeans application that reads JSON-like files output from an 3rd party program.

I say "json-like" because the output of that program does not strictly adhere to the JSON standard.  It contains multiple records, each in JSON format, but each is on its own line.  JSON standard says the entire file should be one big JSON record.  

But those details are not important.  What is important are the following facts:
- We need to work with these files, and we can't do anything about their non-compliance.
- We would like to keep the .json extension, even though they are not 100% perfectly compliant.  That is the name given to them by the 3rd party program, and that is the best extension for people in my team to recognize their intended purpose.
- We still want Netbeans to see these files, because we want them as part of our unit test infrastructure, and it is much easier if Netbeans is aware of them.  So we do not want to exclude them from the Netbeans project.
- We don't want to get "Error parsing file" error flags for these files, because those flags can obscure real issues when rolled up to higher directory levels.  It is just easier if the project shows as completely clean.
- At the moment we only have these particular JSON files, so today a solution would be to turn off the error for all .json files.  But in the future we might use JSON files other than as unit test input, in which case it might be good for those files to report errors.

Please consider our request for enhancement, and thank you
Comment 1 ron_butler 2016-03-14 18:33:33 UTC
Created attachment 158856 [details]
IDE log
Comment 2 Jiri Prox 2016-03-17 17:06:19 UTC
Do you use other json files in your project? 

If not, you can try removing association between .json extension and JSON mime type.
Open Options -> Miscellaneous -> Files, find json extension and set mime type to text/plain