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 239604

Summary: Json format should have better default prefs
Product: javascript Reporter: vidhyadharantechdays <vidhyadharantechdays>
Component: JSONAssignee: Petr Hejl <phejl>
Status: VERIFIED FIXED    
Severity: normal    
Priority: P3    
Version: 7.4   
Hardware: PC   
OS: Windows XP x64   
Issue Type: DEFECT Exception Reporter:
Attachments: Sample file

Description vidhyadharantechdays 2013-12-18 11:38:47 UTC
Created attachment 143300 [details]
Sample file

Hi,

 I encounter a problem i.e. when I did a format , the json structure not change

Please find the attached sample request.json file

Regards,
Vidhya
Comment 1 lforet 2013-12-18 20:41:19 UTC
I have the same issue. But to be more precise, format is done but not very well.
Like for xml formatter, I expect that new lines, and spaces are inserted with the right indentation.

For now, that is not the case.
Comment 2 Vladimir Riha 2013-12-30 08:11:25 UTC
Reproducible, formatting as such works, but it does not break lines

Product Version: NetBeans IDE Dev (Build 201312290308)
Java: 1.7.0_45; Java HotSpot(TM) Client VM 24.45-b08
Runtime: Java(TM) SE Runtime Environment 1.7.0_45-b18
System: Linux version 3.2.0-48-generic-pae running on i386; UTF-8; en_US (nb)
Comment 3 Petr Hejl 2014-01-06 15:17:14 UTC
Afaik the formatting works fine. You just need to set the wrapping to your preferences. I understand we should change the defaults.
Comment 4 Petr Hejl 2014-01-10 13:52:03 UTC
Fixed in web-main 3f307e647e30.
Comment 5 lforet 2014-01-10 14:10:27 UTC
(In reply to Petr Hejl from comment #3)
> Afaik the formatting works fine. You just need to set the wrapping to your
> preferences. I understand we should change the defaults.

Indeed, it works fine. But change the defaults was a good idea too.

Thanks.
Comment 6 Quality Engineering 2014-01-11 04:47:26 UTC
Integrated into 'main-silver', will be available in build *201401110002* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)

Changeset: http://hg.netbeans.org/main-silver/rev/3f307e647e30
User: Petr Hejl <phejl@netbeans.org>
Log: #239604 - Json format should have better default prefs
Comment 7 vidhyadharantechdays 2014-01-18 06:24:26 UTC
I  have verified in Netbeans 8.0 beta. Still the problem persist.
Comment 8 vidhyadharantechdays 2014-01-20 14:25:44 UTC
I verified @nightly build ,the issue has been fixed. I believe it will be available in  NB 8.0 .

Thanks