-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path9-es2015.f986f40a5eb4af790fc9.js
More file actions
1 lines (1 loc) · 7.42 KB
/
Copy path9-es2015.f986f40a5eb4af790fc9.js
File metadata and controls
1 lines (1 loc) · 7.42 KB
1
(window.webpackJsonp=window.webpackJsonp||[]).push([[9],{e1xo:function(n,e,t){"use strict";t.r(e);var r=t("8Y7J"),o='## What is JSON Formatting?\r\n\r\nJSON formatting is the process of applying styling rules or guidelines to a JSON document. This makes it easier to read the JSON.\r\n\r\n### Example\r\n\r\nThe following unformatted code:\r\n```javascript\r\n{"hello":"world"}\r\n```\r\n\r\nCan be formatted as:\r\n```javascript\r\n{\r\n "hello": "world"\r\n}\r\n```\r\n\r\n### Indenting with Spaces versus Tabs\r\n\r\nThis is how newlines are indented. Typically this is 2 to 3 spaces or a single tab. This is purely a personal choice, but is a good idea to be consistent with whatever indentation type is selected. Note that many IDEs automatically convert tabs to a certain amount of spaces.\r\n\r\n2 spaces:\r\n```javascript\r\n{\r\n "first": "one",\r\n "nested": {\r\n "second": "one"\r\n }\r\n}\r\n```\r\n\r\n3 spaces:\r\n```javascript\r\n{\r\n "first": "one",\r\n "nested": {\r\n "second": "one"\r\n }\r\n}\r\n```\r\n\r\nand one tab:\r\n```javascript\r\n{\r\n "first": "one",\r\n "nested": {\r\n "second": "one"\r\n }\r\n}\r\n```\r\n\r\n### Nested Objects or Arrays\r\n\r\nJSON often describes complex structures with many nested levels. The root object is often made up of other objects or arrays, and those children objects may also contain additional objects. To make these complex documents readable, nested objects are indented with more spaces or tabs based on the nesting level (level * newline indentation). If 2 spaces are used for newlines, then the first level would have 2 spaces, the second would have 4, the thrid 6, and so on.\r\n\r\nThis looks like:\r\n```javascript\r\n{\r\n "first": "one",\r\n "second": "one",\r\n "nested": {\r\n "third": [\r\n {\r\n "fourth": "one"\r\n },\r\n {\r\n "fifth": {\r\n "sixth": "one"\r\n }\r\n }\r\n ]\r\n }\r\n}\r\n```\r\n\r\n## When is JSON Formatting Needed?\r\n\r\nJSON formatting is needed whenever JSON needs to be easily read by a real person.\r\n\r\nWhen JSON is generated by developer tools, it often does not follow any style guides. This unformatted JSON is still easily read by tools, but hurts readability for humans.\r\n\r\nAdditionally when trasnmitting JSON over the internet, it is often minified or has whitespace characters removed. This can result in faster load timess of websites, but once against hurts the ease of reading for human.';class a{constructor(){this.tool={id:"json-format",action:"Format",schema:{type:"object",properties:{input:{type:"string",title:"JSON",description:"JSON to format"},advanced:{type:"object",properties:{whitespaceType:{type:"string",enum:["space","tab"],default:"space",description:"New line indent format"},size:{type:"number",default:3,description:"Number of spaces to indent with"}},required:["whitespaceType"],"x-schema-form":{type:"section",expandable:!0,expande:!1,title:"Advanced"}}},required:["input"]},onTransform:n=>{const e=n.advanced;var t=JSON.parse(n.input);return JSON.stringify(t,null,"space"==e.whitespaceType?e.size:"\t")},documentation:o}}}class s{}var i=t("t68o"),b=t("zbXB"),c=t("NcP4"),l=t("oMTq"),d=t("pMnS"),u=t("SVse"),D=t("s7LF"),p=t("/q54"),h=t("QQfA"),m=t("IP0z"),f=t("/Co4"),g=t("POq0"),y=t("Xd0L"),w=t("s6ns"),v=t("821u"),N=t("/HVE"),J=t("JjoW"),j=t("cUpR"),O=t("qJ5m"),T=t("Mz6y"),S=t("qgBN"),x=t("ZcxY"),k=t("IheW"),z=t("VDRc"),q=t("ura0"),F=t("Nhcz"),C=t("u9T3"),I=t("zMNK"),A=t("hOhj"),H=t("Fwaw"),L=t("mkRZ"),M=t("igqZ"),V=t("r0V8"),B=t("kNGD"),R=t("5GAg"),W=t("5Bek"),Z=t("c9fC"),_=t("HsOI"),K=t("Gi4r"),E=t("oapL"),G=t("ZwOa"),P=t("elxJ"),Q=t("lT8R"),Y=t("pBi1"),U=t("qJ50"),X=t("rWV4"),$=t("02hT"),nn=t("Q+lL"),en=t("KnIn"),tn=t("pKmL"),rn=t("iInd"),on=t("dvZr"),an=t("v9Ap"),sn=t("UxM3"),bn=t("CY5v"),cn=t("x+0o");t.d(e,"JsonFormatModuleNgFactory",(function(){return ln})),t.d(e,"RenderType_JsonFormatComponent",(function(){return dn})),t.d(e,"View_JsonFormatComponent_0",(function(){return un})),t.d(e,"View_JsonFormatComponent_Host_0",(function(){return Dn})),t.d(e,"JsonFormatComponentNgFactory",(function(){return pn}));var ln=r.qb(s,[],(function(n){return r.Cb([r.Db(512,r.j,r.Z,[[8,[i.a,b.b,b.a,c.a,l.z,l.A,l.B,l.C,l.D,l.E,l.F,l.G,l.H,l.I,l.J,l.K,l.L,l.M,l.N,l.O,l.P,l.Q,l.R,l.S,l.c,l.d,l.e,l.f,l.g,l.h,l.i,l.j,l.k,l.l,l.m,l.n,l.o,l.p,l.q,l.r,l.s,l.t,l.u,l.v,l.w,l.x,l.y,d.a,pn]],[3,r.j],r.v]),r.Db(4608,u.m,u.l,[r.s,[2,u.B]]),r.Db(4608,D.z,D.z,[]),r.Db(4608,D.g,D.g,[]),r.Db(5120,r.b,(function(n,e){return[p.j(n,e)]}),[u.d,r.z]),r.Db(4608,h.c,h.c,[h.i,h.e,r.j,h.h,h.f,r.p,r.x,u.d,m.b,[2,u.g]]),r.Db(5120,h.j,h.k,[h.c]),r.Db(5120,f.b,f.c,[h.c]),r.Db(4608,g.c,g.c,[]),r.Db(4608,y.b,y.b,[]),r.Db(5120,w.b,w.c,[h.c]),r.Db(135680,w.d,w.d,[h.c,r.p,[2,u.g],[2,w.a],w.b,[3,w.d],h.e]),r.Db(4608,v.i,v.i,[]),r.Db(5120,v.a,v.b,[h.c]),r.Db(4608,y.a,y.w,[[2,y.f],N.a]),r.Db(5120,J.a,J.b,[h.c]),r.Db(4608,j.e,y.c,[[2,y.g],[2,y.l]]),r.Db(5120,O.b,O.a,[[3,O.b]]),r.Db(5120,T.a,T.b,[h.c]),r.Db(4608,S.d,S.d,[]),r.Db(5120,S.h,(function(){return[new S.l,new S.I]}),[]),r.Db(4608,S.H,S.H,[]),r.Db(4608,S.g,S.g,[S.h,S.H]),r.Db(4608,x.c,x.c,[r.z,[2,k.a],j.b,x.d]),r.Db(1073742336,u.c,u.c,[]),r.Db(1073742336,D.y,D.y,[]),r.Db(1073742336,D.l,D.l,[]),r.Db(1073742336,D.u,D.u,[]),r.Db(1073742336,p.c,p.c,[]),r.Db(1073742336,m.a,m.a,[]),r.Db(1073742336,z.i,z.i,[]),r.Db(1073742336,q.b,q.b,[]),r.Db(1073742336,F.a,F.a,[]),r.Db(1073742336,C.a,C.a,[[2,p.g],r.z]),r.Db(1073742336,y.l,y.l,[[2,y.d],[2,j.f]]),r.Db(1073742336,N.b,N.b,[]),r.Db(1073742336,y.v,y.v,[]),r.Db(1073742336,y.t,y.t,[]),r.Db(1073742336,y.q,y.q,[]),r.Db(1073742336,I.g,I.g,[]),r.Db(1073742336,A.c,A.c,[]),r.Db(1073742336,h.g,h.g,[]),r.Db(1073742336,f.e,f.e,[]),r.Db(1073742336,H.c,H.c,[]),r.Db(1073742336,L.e,L.e,[]),r.Db(1073742336,M.e,M.e,[]),r.Db(1073742336,g.d,g.d,[]),r.Db(1073742336,V.d,V.d,[]),r.Db(1073742336,V.c,V.c,[]),r.Db(1073742336,B.e,B.e,[]),r.Db(1073742336,w.g,w.g,[]),r.Db(1073742336,R.a,R.a,[]),r.Db(1073742336,v.j,v.j,[]),r.Db(1073742336,W.c,W.c,[]),r.Db(1073742336,Z.c,Z.c,[]),r.Db(1073742336,_.e,_.e,[]),r.Db(1073742336,K.c,K.c,[]),r.Db(1073742336,E.c,E.c,[]),r.Db(1073742336,G.c,G.c,[]),r.Db(1073742336,y.x,y.x,[]),r.Db(1073742336,y.n,y.n,[]),r.Db(1073742336,P.d,P.d,[]),r.Db(1073742336,J.d,J.d,[]),r.Db(1073742336,Q.b,Q.b,[]),r.Db(1073742336,Y.d,Y.d,[]),r.Db(1073742336,Y.c,Y.c,[]),r.Db(1073742336,U.e,U.e,[]),r.Db(1073742336,O.c,O.c,[]),r.Db(1073742336,X.k,X.k,[]),r.Db(1073742336,T.c,T.c,[]),r.Db(1073742336,S.N,S.N,[]),r.Db(1073742336,S.f,S.f,[]),r.Db(1073742336,S.m,S.m,[]),r.Db(1073742336,S.e,S.e,[]),r.Db(1073742336,y.m,y.m,[]),r.Db(1073742336,$.b,$.b,[]),r.Db(1073742336,nn.d,nn.d,[]),r.Db(1073742336,x.b,x.b,[]),r.Db(1073742336,en.a,en.a,[]),r.Db(1073742336,tn.a,tn.a,[]),r.Db(1073742336,rn.m,rn.m,[[2,rn.r],[2,rn.k]]),r.Db(1073742336,s,s,[]),r.Db(256,B.a,{separatorKeyCodes:[on.f]},[]),r.Db(256,y.e,y.i,[]),r.Db(256,x.d,{gfm:!0,tables:!0,breaks:!1,pedantic:!1,sanitize:!1,smartLists:!0,smartypants:!1},[]),r.Db(1024,rn.i,(function(){return[[{path:"",component:a}]]}),[])])})),dn=r.rb({encapsulation:2,styles:[],data:{}});function un(n){return r.Ob(0,[(n()(),r.tb(0,0,null,null,1,"app-transform-tool",[],null,null,null,an.b,an.a)),r.sb(1,114688,null,0,sn.a,[bn.a,cn.a],{tool:[0,"tool"]},null)],(function(n,e){n(e,1,0,e.component.tool)}),null)}function Dn(n){return r.Ob(0,[(n()(),r.tb(0,0,null,null,1,"ng-component",[],null,null,null,un,dn)),r.sb(1,49152,null,0,a,[],null,null)],null,null)}var pn=r.pb("ng-component",a,Dn,{},{},[])}}]);