1:"$Sreact.fragment" 2:I[1402,["619","static/chunks/619-ba102abea3e3d0e4.js","952","static/chunks/952-4eb143c2e0fe3db4.js","177","static/chunks/app/layout-e83181ce6c1ed0b9.js"],""] 3:I[8891,["619","static/chunks/619-ba102abea3e3d0e4.js","952","static/chunks/952-4eb143c2e0fe3db4.js","177","static/chunks/app/layout-e83181ce6c1ed0b9.js"],"default"] 4:I[9766,[],""] 5:I[8924,[],""] 6:I[2619,["619","static/chunks/619-ba102abea3e3d0e4.js","364","static/chunks/app/resources/%5Bslug%5D/page-433884b4dc181061.js"],""] 13:I[7150,[],""] :HL["/_next/static/css/62c4fedfac335af9.css","style"] 0:{"P":null,"b":"TI7nt16mKKtxQtr-wkJZ3","p":"","c":["","resources","parsing-and-serialization"],"i":false,"f":[[["",{"children":["resources",{"children":[["slug","parsing-and-serialization","d"],{"children":["__PAGE__",{}]}]}]},"$undefined","$undefined",true],["",["$","$1","c",{"children":[[["$","link","0",{"rel":"stylesheet","href":"/_next/static/css/62c4fedfac335af9.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}]],["$","html",null,{"lang":"en","suppressHydrationWarning":true,"children":["$","body",null,{"children":[["$","$L2",null,{"id":"ga4-consent-default","strategy":"beforeInteractive","children":"window.dataLayer=window.dataLayer||[];function gtag(){dataLayer.push(arguments);}gtag('consent','default',{analytics_storage:'denied',ad_storage:'denied',ad_user_data:'denied',ad_personalization:'denied',wait_for_update:500});"}],["$","$L2",null,{"src":"https://www.googletagmanager.com/gtag/js?id=G-TGYHX8MW7F","strategy":"afterInteractive"}],["$","$L2",null,{"id":"ga4-config","strategy":"afterInteractive","children":"window.dataLayer=window.dataLayer||[];function gtag(){dataLayer.push(arguments);}gtag('js',new Date());gtag('config','G-TGYHX8MW7F');"}],["$","$L2",null,{"strategy":"afterInteractive","async":true,"src":"https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js?client=ca-pub-9789622687009991","crossOrigin":"anonymous"}],["$","$L3",null,{}],["$","main",null,{"children":["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":[["$","section",null,{"className":"shell notfound","children":[["$","svg",null,{"ref":"$undefined","xmlns":"http://www.w3.org/2000/svg","width":48,"height":48,"viewBox":"0 0 24 24","fill":"none","stroke":"currentColor","strokeWidth":2,"strokeLinecap":"round","strokeLinejoin":"round","className":"lucide lucide-braces","children":[["$","path","ezmyqa",{"d":"M8 3H7a2 2 0 0 0-2 2v5a2 2 0 0 1-2 2 2 2 0 0 1 2 2v5c0 1.1.9 2 2 2h1"}],["$","path","e1hn23",{"d":"M16 21h1a2 2 0 0 0 2-2v-5c0-1.1.9-2 2-2a2 2 0 0 1-2-2V5a2 2 0 0 0-2-2h-1"}],"$undefined"]}],["$","h1",null,{"children":"404 โ€” This JSON path doesn't exist."}],["$","p",null,{"children":"The tool may have moved, or the address may contain a typo."}],["$","$L6",null,{"href":"/","className":"button primary","children":[["$","svg",null,{"ref":"$undefined","xmlns":"http://www.w3.org/2000/svg","width":18,"height":18,"viewBox":"0 0 24 24","fill":"none","stroke":"currentColor","strokeWidth":2,"strokeLinecap":"round","strokeLinejoin":"round","className":"lucide lucide-house","children":[["$","path","5wwlr5",{"d":"M15 21v-8a1 1 0 0 0-1-1h-4a1 1 0 0 0-1 1v8"}],["$","path","1d0kgt",{"d":"M3 10a2 2 0 0 1 .709-1.528l7-5.999a2 2 0 0 1 2.582 0l7 5.999A2 2 0 0 1 21 10v9a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z"}],"$undefined"]}]," Return to JSON Formatter"]}],["$","$L6",null,{"href":"/json-tree-viewer","className":"button ghost","children":[["$","svg",null,{"ref":"$undefined","xmlns":"http://www.w3.org/2000/svg","width":18,"height":18,"viewBox":"0 0 24 24","fill":"none","stroke":"currentColor","strokeWidth":2,"strokeLinecap":"round","strokeLinejoin":"round","className":"lucide lucide-search","children":[["$","circle","4ej97u",{"cx":"11","cy":"11","r":"8"}],["$","path","1qie3q",{"d":"m21 21-4.3-4.3"}],"$undefined"]}]," Explore Tree Viewer"]}]]}],[]],"forbidden":"$undefined","unauthorized":"$undefined"}]}],["$","footer",null,{"className":"footer","children":[["$","div",null,{"className":"shell footer-grid footer-grid-v4","children":[["$","div",null,{"className":"footer-about","children":[["$","div",null,{"className":"footer-identity","children":[["$","img",null,{"src":"/logo.svg","alt":"","width":"48","height":"48"}],["$","strong",null,{"children":"JSONFormatter"}]]}],["$","p",null,{"children":"by Clearfunda ยท JSON formatting, testing and developer tools."}]]}],["$","nav",null,{"aria-label":"Information","children":[["$","strong",null,{"children":"INFORMATION"}],["$","$L6",null,{"href":"/about","children":"About Us"}],["$","$L6",null,{"href":"/contact","children":"Contact Us"}],["$","$L6",null,{"href":"/terms-and-conditions","children":"Terms & Conditions"}],["$","$L6",null,{"href":"/privacy","children":"Privacy Policy"}]]}],["$","nav",null,{"aria-label":"JSON tools","children":[["$","strong",null,{"children":"JSON TOOLS"}],[["$","$L6","/",{"href":"/","children":"JSON Formatter"}],["$","$L6","/json-tree-viewer",{"href":"/json-tree-viewer","children":"JSON Tree Viewer"}],["$","$L6","/json-compare",{"href":"/json-compare","children":"JSON Compare"}],"$L7","$L8","$L9"],"$La","$Lb"]}],"$Lc","$Ld"]}],"$Le"]}]]}]}]]}],{"children":["resources","$Lf",{"children":[["slug","parsing-and-serialization","d"],"$L10",{"children":["__PAGE__","$L11",{},null,false]},null,false]},null,false]},null,false],"$L12",false]],"m":"$undefined","G":["$13",[]],"s":false,"S":true} 15:I[4431,[],"OutletBoundary"] 17:I[5278,[],"AsyncMetadataOutlet"] 19:I[4431,[],"ViewportBoundary"] 1b:I[4431,[],"MetadataBoundary"] 1c:"$Sreact.suspense" 7:["$","$L6","/json-data-generator",{"href":"/json-data-generator","children":"JSON Data Generator"}] 8:["$","$L6","/json-redactor",{"href":"/json-redactor","children":"Sensitive Data Redactor"}] 9:["$","$L6","/json-schema-validator",{"href":"/json-schema-validator","children":"JSON Schema Validator"}] a:["$","$L6",null,{"href":"/api-tester","children":"REST API Tester"}] b:["$","$L6",null,{"href":"/resources","children":"Learn JSON"}] c:["$","nav",null,{"aria-label":"Other Clearfunda tools","children":[["$","strong",null,{"children":"OTHER CLEARFUNDA TOOLS"}],["$","a",null,{"href":"https://unitconverter.clearfunda.com/","target":"_blank","rel":"noopener noreferrer","children":"UnitConverter"}],["$","a",null,{"href":"https://text-compare.clearfunda.com/","target":"_blank","rel":"noopener noreferrer","children":"Text Compare"}],["$","a",null,{"href":"https://favicon-generator.clearfunda.com/","target":"_blank","rel":"noopener noreferrer","children":"Favicon Generator"}],["$","a",null,{"href":"https://password-generator.clearfunda.com/","target":"_blank","rel":"noopener noreferrer","children":"Password Generator"}],["$","a",null,{"href":"https://notepad.clearfunda.com/","target":"_blank","rel":"noopener noreferrer","children":"NotePad"}]]}] d:["$","div",null,{"className":"footer-social","children":[["$","strong",null,{"children":"FOLLOW US"}],["$","div",null,{"className":"socials","children":[["$","a",null,{"href":"https://x.com/clearfunda1","aria-label":"X","target":"_blank","rel":"noopener noreferrer","children":"๐•"}],["$","a",null,{"href":"https://www.linkedin.com/company/clearfunda/","aria-label":"LinkedIn","target":"_blank","rel":"noopener noreferrer","children":["$","svg",null,{"ref":"$undefined","xmlns":"http://www.w3.org/2000/svg","width":19,"height":19,"viewBox":"0 0 24 24","fill":"none","stroke":"currentColor","strokeWidth":2,"strokeLinecap":"round","strokeLinejoin":"round","className":"lucide lucide-linkedin","children":[["$","path","c2jq9f",{"d":"M16 8a6 6 0 0 1 6 6v7h-4v-7a2 2 0 0 0-2-2 2 2 0 0 0-2 2v7h-4v-7a6 6 0 0 1 6-6z"}],["$","rect","mk3on5",{"width":"4","height":"12","x":"2","y":"9"}],["$","circle","bt5ra8",{"cx":"4","cy":"4","r":"2"}],"$undefined"]}]}],["$","a",null,{"href":"https://www.facebook.com/clearfundaofficial","aria-label":"Facebook","target":"_blank","rel":"noopener noreferrer","children":["$","svg",null,{"ref":"$undefined","xmlns":"http://www.w3.org/2000/svg","width":19,"height":19,"viewBox":"0 0 24 24","fill":"none","stroke":"currentColor","strokeWidth":2,"strokeLinecap":"round","strokeLinejoin":"round","className":"lucide lucide-facebook","children":[["$","path","1jg4f8",{"d":"M18 2h-3a5 5 0 0 0-5 5v3H7v4h3v8h4v-8h3l1-4h-4V7a1 1 0 0 1 1-1h3z"}],"$undefined"]}]}]]}]]}] e:["$","div",null,{"className":"shell footer-bottom footer-bottom-v4","children":["ยฉ ",2026," ClearFunda. All rights reserved."]}] f:["$","$1","c",{"children":[null,["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","forbidden":"$undefined","unauthorized":"$undefined"}]]}] 10:["$","$1","c",{"children":[null,["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","forbidden":"$undefined","unauthorized":"$undefined"}]]}] 11:["$","$1","c",{"children":["$L14",null,["$","$L15",null,{"children":["$L16",["$","$L17",null,{"promise":"$@18"}]]}]]}] 12:["$","$1","h",{"children":[null,[["$","$L19",null,{"children":"$L1a"}],null],["$","$L1b",null,{"children":["$","div",null,{"hidden":true,"children":["$","$1c",null,{"fallback":null,"children":"$L1d"}]}]}]]}] 1e:I[9205,["619","static/chunks/619-ba102abea3e3d0e4.js","364","static/chunks/app/resources/%5Bslug%5D/page-433884b4dc181061.js"],"default"] 14:["$","main",null,{"className":"shell resource-article","children":[["$","$L6",null,{"href":"/resources","children":"โ† All learning resources"}],["$","h1",null,{"children":"JSON Parsing and Serialization: Practical Examples"}],["$","p",null,{"className":"resource-lead","children":"Parse and serialize JSON correctly in JavaScript, Python and APIs."}],[["$","section","Parsing JSON",{"id":"section-1","children":[["$","h2",null,{"children":"Parsing JSON"}],["$","p",null,{"children":"Parsing converts JSON text into language-native data. JavaScript: const data = JSON.parse(`{\"ok\":true}`); Python: data = json.loads(`{\"ok\": true}`). Always handle malformed input."}]]}],["$","section","Serializing JSON",{"id":"section-2","children":[["$","h2",null,{"children":"Serializing JSON"}],["$","p",null,{"children":"Serialization turns values back into JSON text. JavaScript: JSON.stringify({ok:true}, null, 2). Python: json.dumps({\"ok\": True}, indent=2)."}]]}],["$","section","Strings, escaping and Unicode",{"id":"section-3","children":[["$","h2",null,{"children":"Strings, escaping and Unicode"}],["$","p",null,{"children":"Property names and string values must use double quotes in JSON. A quote inside a string is escaped as \". A backslash is escaped as \\. Unicode characters can be represented directly or with escape sequences."}]]}],["$","section","Dates, nulls and numbers",{"id":"section-4","children":[["$","h2",null,{"children":"Dates, nulls and numbers"}],["$","p",null,{"children":"JSON has no date type; serialize dates as documented strings. null maps to different language-native values. Avoid unsafe integer coercion and non-finite numbers."}]]}],["$","section","Common pitfalls",{"id":"section-5","children":[["$","h2",null,{"children":"Common pitfalls"}],["$","p",null,{"children":"JSON.parse throws on trailing commas and comments. Circular JavaScript objects cannot be passed directly to JSON.stringify. Undefined object properties are omitted by JSON.stringify."}]]}],["$","section","Try the formatter",{"id":"section-6","children":[["$","h2",null,{"children":"Try the formatter"}],["$","p",null,{"children":"Paste {\"order\":{\"id\":102,\"items\":[{\"sku\":\"SKU-1\",\"qty\":2}]}} into the main JSON Formatter and switch between code and tree views."}]]}]],["$","$L1e",null,{"slug":"parsing-and-serialization"}],["$","div",null,{"className":"panel-note","children":["Practice these concepts using the ",["$","$L6",null,{"href":"/","children":"JSON Formatter"}],", ",["$","$L6",null,{"href":"/json-schema-validator","children":"Schema Validator"}]," and ",["$","$L6",null,{"href":"/api-tester","children":"REST API Tester"}],"."]}]]}] 1a:[["$","meta","0",{"charSet":"utf-8"}],["$","meta","1",{"name":"viewport","content":"width=device-width, initial-scale=1"}],["$","meta","2",{"name":"theme-color","content":"#152c46"}]] 16:null 1f:I[622,[],"IconMark"] 18:{"metadata":[["$","title","0",{"children":"JSON Parsing and Serialization: Practical Examples | JSONFormatter by Clearfunda"}],["$","meta","1",{"name":"description","content":"Parse and serialize JSON correctly in JavaScript, Python and APIs."}],["$","meta","2",{"name":"application-name","content":"JSONFormatter by Clearfunda"}],["$","meta","3",{"name":"creator","content":"Clearfunda"}],["$","meta","4",{"name":"publisher","content":"Clearfunda"}],["$","meta","5",{"name":"robots","content":"index, follow"}],["$","meta","6",{"name":"category","content":"developer tools"}],["$","meta","7",{"name":"google-adsense-account","content":"ca-pub-9789622687009991"}],["$","link","8",{"rel":"canonical","href":"https://jsonformatter.clearfunda.com/resources/parsing-and-serialization"}],["$","meta","9",{"property":"og:title","content":"JSONFormatter by Clearfunda"}],["$","meta","10",{"property":"og:description","content":"Format, inspect, validate, compare and test JSON privately in your browser."}],["$","meta","11",{"property":"og:url","content":"https://jsonformatter.clearfunda.com"}],["$","meta","12",{"property":"og:site_name","content":"JSONFormatter by Clearfunda"}],["$","meta","13",{"property":"og:image","content":"https://jsonformatter.clearfunda.com/og-jsonformatter.png"}],["$","meta","14",{"property":"og:image:width","content":"1200"}],["$","meta","15",{"property":"og:image:height","content":"630"}],["$","meta","16",{"property":"og:image:alt","content":"JSONFormatter by Clearfunda developer workspace"}],["$","meta","17",{"property":"og:type","content":"website"}],["$","meta","18",{"name":"twitter:card","content":"summary_large_image"}],["$","meta","19",{"name":"twitter:title","content":"JSONFormatter by Clearfunda"}],["$","meta","20",{"name":"twitter:description","content":"Modern JSON development and testing workspace."}],["$","meta","21",{"name":"twitter:image","content":"https://jsonformatter.clearfunda.com/og-jsonformatter.png"}],["$","link","22",{"rel":"icon","href":"/favicon.ico","sizes":"any"}],["$","link","23",{"rel":"icon","href":"/icon.svg","type":"image/svg+xml"}],["$","link","24",{"rel":"apple-touch-icon","href":"/apple-touch-icon.png"}],["$","$L1f","25",{}]],"error":null,"digest":"$undefined"} 1d:"$18:metadata"