[{"data":1,"prerenderedAt":4675},["ShallowReactive",2],{"tutorials-python-how-to":3,"category-items-python-how-to":600,"content-/python-how-to/work-json-files":601},[4,22,31,40,49,58,67,76,86,94,103,112,121,130,139,148,158,167,176,185,194,203,212,222,231,240,249,258,267,276,285,297,306,315,324,333,342,351,362,371,380,389,398,407,418,427,436,445,454,463,472,483,492,501,510,519,528,539,548,557,566,575,584,593],{"_path":5,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":9,"description":10,"slug":11,"order":12,"isParent":13,"icon":14,"_type":15,"_id":16,"_source":17,"_file":18,"_stem":19,"_extension":20,"children":21,"expanded":13},"/python-how-to/string-manipulation","python-how-to",false,"","String Manipulation","Learn essential string manipulation techniques in Python","string-manipulation",1,true,"pi pi-folder","markdown","content:python-how-to:1.string-manipulation.md","content","python-how-to/1.string-manipulation.md","python-how-to/1.string-manipulation","md",[22,31,40,49,58,67],{"_path":23,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":24,"description":25,"slug":26,"parentId":5,"order":27,"_type":15,"_id":28,"_source":17,"_file":29,"_stem":30,"_extension":20},"/python-how-to/split-join-strings","Split and Join Strings","Learn how to split strings into lists and join lists back into strings in Python","split-join-strings",2,"content:python-how-to:2.split-join-strings.md","python-how-to/2.split-join-strings.md","python-how-to/2.split-join-strings",{"_path":32,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":33,"description":34,"slug":35,"parentId":5,"order":36,"_type":15,"_id":37,"_source":17,"_file":38,"_stem":39,"_extension":20},"/python-how-to/remove-whitespace","Remove Whitespace","Learn how to clean up and remove unwanted whitespace from strings in Python","remove-whitespace",3,"content:python-how-to:3.remove-whitespace.md","python-how-to/3.remove-whitespace.md","python-how-to/3.remove-whitespace",{"_path":41,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":42,"description":43,"slug":44,"parentId":5,"order":45,"_type":15,"_id":46,"_source":17,"_file":47,"_stem":48,"_extension":20},"/python-how-to/find-replace-text","Find and Replace Text","Learn how to search for and replace text within strings in Python","find-replace-text",4,"content:python-how-to:4.find-replace-text.md","python-how-to/4.find-replace-text.md","python-how-to/4.find-replace-text",{"_path":50,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":51,"description":52,"slug":53,"parentId":5,"order":54,"_type":15,"_id":55,"_source":17,"_file":56,"_stem":57,"_extension":20},"/python-how-to/check-string-content","Check String Content","Learn how to validate and check the content of strings in Python","check-string-content",5,"content:python-how-to:5.check-string-content.md","python-how-to/5.check-string-content.md","python-how-to/5.check-string-content",{"_path":59,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":60,"description":61,"slug":62,"parentId":5,"order":63,"_type":15,"_id":64,"_source":17,"_file":65,"_stem":66,"_extension":20},"/python-how-to/format-strings","Format Strings","Learn how to format strings in Python using f-strings and format() method","format-strings",6,"content:python-how-to:6.format-strings.md","python-how-to/6.format-strings.md","python-how-to/6.format-strings",{"_path":68,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":69,"description":70,"slug":71,"parentId":5,"order":72,"_type":15,"_id":73,"_source":17,"_file":74,"_stem":75,"_extension":20},"/python-how-to/unicode-special-chars","Handle Unicode and Special Characters","Learn how to work with Unicode and special characters in Python strings","unicode-special-chars",7,"content:python-how-to:7.unicode-special-chars.md","python-how-to/7.unicode-special-chars.md","python-how-to/7.unicode-special-chars",{"_path":77,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":78,"description":79,"slug":80,"order":81,"isParent":13,"icon":14,"_type":15,"_id":82,"_source":17,"_file":83,"_stem":84,"_extension":20,"children":85,"expanded":13},"/python-how-to/list-operations","List Operations","Learn essential operations for working with lists in Python","list-operations",8,"content:python-how-to:8.list-operations.md","python-how-to/8.list-operations.md","python-how-to/8.list-operations",[86,94,103,112,121,130,139],{"_path":87,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":88,"description":89,"slug":90,"parentId":77,"order":81,"_type":15,"_id":91,"_source":17,"_file":92,"_stem":93,"_extension":20},"/python-how-to/sort-lists","Sort Lists","Learn how to sort lists in Python using different methods and custom sorting","sort-lists","content:python-how-to:9.sort-lists.md","python-how-to/9.sort-lists.md","python-how-to/9.sort-lists",{"_path":95,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":96,"description":97,"slug":98,"parentId":77,"order":99,"_type":15,"_id":100,"_source":17,"_file":101,"_stem":102,"_extension":20},"/python-how-to/remove-duplicates","Remove Duplicates","Learn how to remove duplicate elements from lists in Python","remove-duplicates",10,"content:python-how-to:10.remove-duplicates.md","python-how-to/10.remove-duplicates.md","python-how-to/10.remove-duplicates",{"_path":104,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":105,"description":106,"slug":107,"parentId":77,"order":108,"_type":15,"_id":109,"_source":17,"_file":110,"_stem":111,"_extension":20},"/python-how-to/filter-lists","Filter Lists","Learn how to filter lists in Python using different methods","filter-lists",11,"content:python-how-to:11.filter-lists.md","python-how-to/11.filter-lists.md","python-how-to/11.filter-lists",{"_path":113,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":114,"description":115,"slug":116,"parentId":77,"order":117,"_type":15,"_id":118,"_source":17,"_file":119,"_stem":120,"_extension":20},"/python-how-to/combine-lists","Combine Lists","Learn different methods to combine lists in Python","combine-lists",12,"content:python-how-to:12.combine-lists.md","python-how-to/12.combine-lists.md","python-how-to/12.combine-lists",{"_path":122,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":123,"description":124,"slug":125,"parentId":77,"order":126,"_type":15,"_id":127,"_source":17,"_file":128,"_stem":129,"_extension":20},"/python-how-to/list-comprehensions","Use List Comprehensions","Learn how to create and transform lists efficiently using Python's list comprehension syntax","list-comprehensions",13,"content:python-how-to:13.list-comprehensions.md","python-how-to/13.list-comprehensions.md","python-how-to/13.list-comprehensions",{"_path":131,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":132,"description":133,"slug":134,"parentId":77,"order":135,"_type":15,"_id":136,"_source":17,"_file":137,"_stem":138,"_extension":20},"/python-how-to/nested-lists","Work with Nested Lists","Learn how to work with nested lists (2D arrays) in Python","nested-lists",14,"content:python-how-to:14.nested-lists.md","python-how-to/14.nested-lists.md","python-how-to/14.nested-lists",{"_path":140,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":141,"description":142,"slug":143,"parentId":77,"order":144,"_type":15,"_id":145,"_source":17,"_file":146,"_stem":147,"_extension":20},"/python-how-to/enumerate-zip","Use enumerate() and zip()","Learn how to use enumerate() and zip() for efficient iteration in Python","enumerate-zip",15,"content:python-how-to:15.enumerate-zip.md","python-how-to/15.enumerate-zip.md","python-how-to/15.enumerate-zip",{"_path":149,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":150,"description":151,"slug":152,"order":153,"isParent":13,"icon":14,"_type":15,"_id":154,"_source":17,"_file":155,"_stem":156,"_extension":20,"children":157,"expanded":13},"/python-how-to/dictionary-operations","Dictionary Operations","Learn essential operations for working with dictionaries in Python","dictionary-operations",16,"content:python-how-to:16.dictionary-operations.md","python-how-to/16.dictionary-operations.md","python-how-to/16.dictionary-operations",[158,167,176,185,194,203],{"_path":159,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":160,"description":161,"slug":162,"parentId":149,"order":163,"_type":15,"_id":164,"_source":17,"_file":165,"_stem":166,"_extension":20},"/python-how-to/merge-dictionaries","Merge Dictionaries","Learn different methods to merge dictionaries in Python","merge-dictionaries",17,"content:python-how-to:17.merge-dictionaries.md","python-how-to/17.merge-dictionaries.md","python-how-to/17.merge-dictionaries",{"_path":168,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":169,"description":170,"slug":171,"parentId":149,"order":172,"_type":15,"_id":173,"_source":17,"_file":174,"_stem":175,"_extension":20},"/python-how-to/sort-dictionaries","Sort Dictionaries","Learn how to sort dictionaries by keys or values in Python","sort-dictionaries",18,"content:python-how-to:18.sort-dictionaries.md","python-how-to/18.sort-dictionaries.md","python-how-to/18.sort-dictionaries",{"_path":177,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":178,"description":179,"slug":180,"parentId":149,"order":181,"_type":15,"_id":182,"_source":17,"_file":183,"_stem":184,"_extension":20},"/python-how-to/filter-dictionaries","Filter Dictionaries","Learn how to filter dictionaries based on keys or values in Python","filter-dictionaries",19,"content:python-how-to:19.filter-dictionaries.md","python-how-to/19.filter-dictionaries.md","python-how-to/19.filter-dictionaries",{"_path":186,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":187,"description":188,"slug":189,"parentId":149,"order":190,"_type":15,"_id":191,"_source":17,"_file":192,"_stem":193,"_extension":20},"/python-how-to/handle-missing-keys","Handle Missing Keys","Learn safe ways to access dictionary keys and handle missing values","handle-missing-keys",20,"content:python-how-to:20.handle-missing-keys.md","python-how-to/20.handle-missing-keys.md","python-how-to/20.handle-missing-keys",{"_path":195,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":196,"description":197,"slug":198,"parentId":149,"order":199,"_type":15,"_id":200,"_source":17,"_file":201,"_stem":202,"_extension":20},"/python-how-to/dictionary-comprehensions","Use Dictionary Comprehensions","Learn how to create dictionaries efficiently using comprehensions","dictionary-comprehensions",21,"content:python-how-to:21.dictionary-comprehensions.md","python-how-to/21.dictionary-comprehensions.md","python-how-to/21.dictionary-comprehensions",{"_path":204,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":205,"description":206,"slug":207,"parentId":149,"order":208,"_type":15,"_id":209,"_source":17,"_file":210,"_stem":211,"_extension":20},"/python-how-to/convert-lists-dictionaries","Convert Between Lists and Dictionaries","Learn how to transform data between lists and dictionaries in Python","convert-lists-dictionaries",22,"content:python-how-to:22.convert-lists-dictionaries.md","python-how-to/22.convert-lists-dictionaries.md","python-how-to/22.convert-lists-dictionaries",{"_path":213,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":214,"description":215,"slug":216,"order":217,"isParent":13,"icon":14,"_type":15,"_id":218,"_source":17,"_file":219,"_stem":220,"_extension":20,"children":221,"expanded":13},"/python-how-to/file-operations","File Operations","Learn essential file operations in Python for reading, writing, and managing files","file-operations",23,"content:python-how-to:23.file-operations.md","python-how-to/23.file-operations.md","python-how-to/23.file-operations",[222,231,240,249,258,267,276],{"_path":223,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":224,"description":225,"slug":226,"parentId":213,"order":227,"_type":15,"_id":228,"_source":17,"_file":229,"_stem":230,"_extension":20},"/python-how-to/read-text-files","Read Text Files","Learn how to read text files in Python using different methods","read-text-files",24,"content:python-how-to:24.read-text-files.md","python-how-to/24.read-text-files.md","python-how-to/24.read-text-files",{"_path":232,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":233,"description":234,"slug":235,"parentId":213,"order":236,"_type":15,"_id":237,"_source":17,"_file":238,"_stem":239,"_extension":20},"/python-how-to/write-to-files","Write to Files","Learn how to write and create files in Python using different methods","write-to-files",25,"content:python-how-to:25.write-to-files.md","python-how-to/25.write-to-files.md","python-how-to/25.write-to-files",{"_path":241,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":242,"description":243,"slug":244,"parentId":213,"order":245,"_type":15,"_id":246,"_source":17,"_file":247,"_stem":248,"_extension":20},"/python-how-to/work-csv-files","Work with CSV Files","Learn how to read and write CSV files in Python using the csv module","work-csv-files",26,"content:python-how-to:26.work-csv-files.md","python-how-to/26.work-csv-files.md","python-how-to/26.work-csv-files",{"_path":250,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":251,"description":252,"slug":253,"parentId":213,"order":254,"_type":15,"_id":255,"_source":17,"_file":256,"_stem":257,"_extension":20},"/python-how-to/handle-file-paths","Handle File Paths","Learn how to work with file and directory paths in Python using pathlib and os modules","handle-file-paths",27,"content:python-how-to:27.handle-file-paths.md","python-how-to/27.handle-file-paths.md","python-how-to/27.handle-file-paths",{"_path":259,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":260,"description":261,"slug":262,"parentId":213,"order":263,"_type":15,"_id":264,"_source":17,"_file":265,"_stem":266,"_extension":20},"/python-how-to/work-json-files","Work with JSON Files","Learn how to read and write JSON files in Python using the json module","work-json-files",28,"content:python-how-to:28.work-json-files.md","python-how-to/28.work-json-files.md","python-how-to/28.work-json-files",{"_path":268,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":269,"description":270,"slug":271,"parentId":213,"order":272,"_type":15,"_id":273,"_source":17,"_file":274,"_stem":275,"_extension":20},"/python-how-to/handle-binary-files","Handle Binary Files","Learn how to work with binary files in Python for images, data, and other non-text content","handle-binary-files",29,"content:python-how-to:29.handle-binary-files.md","python-how-to/29.handle-binary-files.md","python-how-to/29.handle-binary-files",{"_path":277,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":278,"description":279,"slug":280,"parentId":213,"order":281,"_type":15,"_id":282,"_source":17,"_file":283,"_stem":284,"_extension":20},"/python-how-to/use-context-managers","Use Context Managers","Learn how to use context managers for safe resource handling in Python","use-context-managers",30,"content:python-how-to:30.use-context-managers.md","python-how-to/30.use-context-managers.md","python-how-to/30.use-context-managers",{"_path":286,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":287,"description":288,"slug":289,"parentId":290,"order":291,"isParent":13,"icon":292,"_type":15,"_id":293,"_source":17,"_file":294,"_stem":295,"_extension":20,"children":296},"/python-how-to/date-and-time","Date and Time","Master Python's date and time handling with datetime, time zones, formatting, and calculations","date-and-time","/python-how-to",31,"pi pi-calendar","content:python-how-to:31.date-and-time.md","python-how-to/31.date-and-time.md","python-how-to/31.date-and-time",[297,306,315,324,333,342],{"_path":298,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":299,"description":300,"slug":301,"parentId":286,"order":302,"_type":15,"_id":303,"_source":17,"_file":304,"_stem":305,"_extension":20},"/python-how-to/get-current-datetime","Get Current Date/Time","Learn how to get current date, time, and timestamps using Python's datetime module","get-current-datetime",32,"content:python-how-to:32.get-current-datetime.md","python-how-to/32.get-current-datetime.md","python-how-to/32.get-current-datetime",{"_path":307,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":308,"description":309,"slug":310,"parentId":286,"order":311,"_type":15,"_id":312,"_source":17,"_file":313,"_stem":314,"_extension":20},"/python-how-to/format-dates","Format Dates","Master date formatting with strftime, custom formats, and locale-aware formatting for user-friendly displays","format-dates",33,"content:python-how-to:33.format-dates.md","python-how-to/33.format-dates.md","python-how-to/33.format-dates",{"_path":316,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":317,"description":318,"slug":319,"parentId":286,"order":320,"_type":15,"_id":321,"_source":17,"_file":322,"_stem":323,"_extension":20},"/python-how-to/calculate-date-differences","Calculate Date Differences","Learn to calculate time differences, durations, and intervals using Python's timedelta for scheduling and analytics","calculate-date-differences",34,"content:python-how-to:34.calculate-date-differences.md","python-how-to/34.calculate-date-differences.md","python-how-to/34.calculate-date-differences",{"_path":325,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":326,"description":327,"slug":328,"parentId":286,"order":329,"_type":15,"_id":330,"_source":17,"_file":331,"_stem":332,"_extension":20},"/python-how-to/parse-date-strings","Parse Date Strings","Convert text dates into Python datetime objects using strptime, handle multiple formats, and validate date input","parse-date-strings",35,"content:python-how-to:35.parse-date-strings.md","python-how-to/35.parse-date-strings.md","python-how-to/35.parse-date-strings",{"_path":334,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":335,"description":336,"slug":337,"parentId":286,"order":338,"_type":15,"_id":339,"_source":17,"_file":340,"_stem":341,"_extension":20},"/python-how-to/handle-timezones","Handle Timezones","Master timezone handling with zoneinfo, UTC conversions, and timezone-aware datetime objects for global applications","handle-timezones",36,"content:python-how-to:36.handle-timezones.md","python-how-to/36.handle-timezones.md","python-how-to/36.handle-timezones",{"_path":343,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":344,"description":345,"slug":346,"parentId":286,"order":347,"_type":15,"_id":348,"_source":17,"_file":349,"_stem":350,"_extension":20},"/python-how-to/work-with-timestamps","Work with Timestamps","Master Unix timestamps in Python - convert between datetime objects and timestamps for APIs, databases, and system integration","work-with-timestamps",37,"content:python-how-to:37.work-with-timestamps.md","python-how-to/37.work-with-timestamps.md","python-how-to/37.work-with-timestamps",{"_path":352,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":353,"description":354,"slug":355,"parentId":290,"order":356,"isParent":13,"icon":357,"_type":15,"_id":358,"_source":17,"_file":359,"_stem":360,"_extension":20,"children":361},"/python-how-to/error-handling","Error Handling","Learn Python's error handling with try/except, custom exceptions, debugging, logging, and retry logic for robust applications","error-handling",38,"pi pi-exclamation-triangle","content:python-how-to:38.error-handling.md","python-how-to/38.error-handling.md","python-how-to/38.error-handling",[362,371,380,389,398],{"_path":363,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":364,"description":365,"slug":366,"parentId":352,"order":367,"_type":15,"_id":368,"_source":17,"_file":369,"_stem":370,"_extension":20},"/python-how-to/handle-exceptions","Handle Exceptions","Master try/except blocks, multiple exception handling, and finally clauses for robust error handling in Python","handle-exceptions",39,"content:python-how-to:39.handle-exceptions.md","python-how-to/39.handle-exceptions.md","python-how-to/39.handle-exceptions",{"_path":372,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":373,"description":374,"slug":375,"parentId":352,"order":376,"_type":15,"_id":377,"_source":17,"_file":378,"_stem":379,"_extension":20},"/python-how-to/create-custom-exceptions","Create Custom Exceptions","Learn to create custom exception classes in Python for specific error handling and better code organization","create-custom-exceptions",40,"content:python-how-to:40.create-custom-exceptions.md","python-how-to/40.create-custom-exceptions.md","python-how-to/40.create-custom-exceptions",{"_path":381,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":382,"description":383,"slug":384,"parentId":352,"order":385,"_type":15,"_id":386,"_source":17,"_file":387,"_stem":388,"_extension":20},"/python-how-to/debug-code","Debug Code","Learn Python debugging techniques using print statements, the debugger, and tools to find and fix code issues","debug-code",41,"content:python-how-to:41.debug-code.md","python-how-to/41.debug-code.md","python-how-to/41.debug-code",{"_path":390,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":391,"description":392,"slug":393,"parentId":352,"order":394,"_type":15,"_id":395,"_source":17,"_file":396,"_stem":397,"_extension":20},"/python-how-to/use-logging","Use Logging","Learn Python's logging module for tracking application behavior, errors, and debugging information","use-logging",42,"content:python-how-to:42.use-logging.md","python-how-to/42.use-logging.md","python-how-to/42.use-logging",{"_path":399,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":400,"description":401,"slug":402,"parentId":352,"order":403,"_type":15,"_id":404,"_source":17,"_file":405,"_stem":406,"_extension":20},"/python-how-to/implement-retry-logic","Implement Retry Logic","Learn to implement retry mechanisms in Python for handling temporary failures and building resilient applications","implement-retry-logic",43,"content:python-how-to:43.implement-retry-logic.md","python-how-to/43.implement-retry-logic.md","python-how-to/43.implement-retry-logic",{"_path":408,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":409,"description":410,"slug":411,"parentId":290,"order":412,"isParent":13,"icon":413,"_type":15,"_id":414,"_source":17,"_file":415,"_stem":416,"_extension":20,"children":417},"/python-how-to/functions-and-modules","Functions and Modules","Learn Python functions, modules, and code organization for building reusable, maintainable applications","functions-and-modules",44,"pi pi-box","content:python-how-to:44.functions-and-modules.md","python-how-to/44.functions-and-modules.md","python-how-to/44.functions-and-modules",[418,427,436,445,454,463],{"_path":419,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":420,"description":421,"slug":422,"parentId":408,"order":423,"_type":15,"_id":424,"_source":17,"_file":425,"_stem":426,"_extension":20},"/python-how-to/write-functions","Write Functions","Learn to create Python functions with parameters, return values, and documentation for reusable code","write-functions",45,"content:python-how-to:45.write-functions.md","python-how-to/45.write-functions.md","python-how-to/45.write-functions",{"_path":428,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":429,"description":430,"slug":431,"parentId":408,"order":432,"_type":15,"_id":433,"_source":17,"_file":434,"_stem":435,"_extension":20},"/python-how-to/use-args-kwargs","Use *args and **kwargs","Learn to use *args and **kwargs for flexible function arguments in Python","use-args-kwargs",46,"content:python-how-to:46.use-args-kwargs.md","python-how-to/46.use-args-kwargs.md","python-how-to/46.use-args-kwargs",{"_path":437,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":438,"description":439,"slug":440,"parentId":408,"order":441,"_type":15,"_id":442,"_source":17,"_file":443,"_stem":444,"_extension":20},"/python-how-to/create-decorators","Create Decorators","Learn to create and use Python decorators to enhance function behavior and add functionality","create-decorators",47,"content:python-how-to:47.create-decorators.md","python-how-to/47.create-decorators.md","python-how-to/47.create-decorators",{"_path":446,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":447,"description":448,"slug":449,"parentId":408,"order":450,"_type":15,"_id":451,"_source":17,"_file":452,"_stem":453,"_extension":20},"/python-how-to/use-generators","Use Generators","Learn to create memory-efficient generators with yield for processing large datasets and sequences","use-generators",48,"content:python-how-to:48.use-generators.md","python-how-to/48.use-generators.md","python-how-to/48.use-generators",{"_path":455,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":456,"description":457,"slug":458,"parentId":408,"order":459,"_type":15,"_id":460,"_source":17,"_file":461,"_stem":462,"_extension":20},"/python-how-to/work-modules-packages","Work with Modules and Packages","Learn to organize Python code with modules and packages, and use imports effectively","work-modules-packages",49,"content:python-how-to:49.work-modules-packages.md","python-how-to/49.work-modules-packages.md","python-how-to/49.work-modules-packages",{"_path":464,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":465,"description":466,"slug":467,"parentId":408,"order":468,"_type":15,"_id":469,"_source":17,"_file":470,"_stem":471,"_extension":20},"/python-how-to/create-virtual-environments","Create Virtual Environments","Learn to create and manage Python virtual environments for project dependency isolation","create-virtual-environments",50,"content:python-how-to:50.create-virtual-environments.md","python-how-to/50.create-virtual-environments.md","python-how-to/50.create-virtual-environments",{"_path":473,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":474,"description":475,"slug":476,"parentId":290,"order":477,"isParent":13,"icon":478,"_type":15,"_id":479,"_source":17,"_file":480,"_stem":481,"_extension":20,"children":482},"/python-how-to/data-processing","Data Processing","Learn Python data processing techniques including regex, APIs, databases, and large file handling","data-processing",51,"pi pi-database","content:python-how-to:51.data-processing.md","python-how-to/51.data-processing.md","python-how-to/51.data-processing",[483,492,501,510,519],{"_path":484,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":485,"description":486,"slug":487,"parentId":473,"order":488,"_type":15,"_id":489,"_source":17,"_file":490,"_stem":491,"_extension":20},"/python-how-to/work-regular-expressions","Work with Regular Expressions","Learn to use Python's re module for pattern matching, text extraction, and data validation","work-regular-expressions",52,"content:python-how-to:52.work-regular-expressions.md","python-how-to/52.work-regular-expressions.md","python-how-to/52.work-regular-expressions",{"_path":493,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":494,"description":495,"slug":496,"parentId":473,"order":497,"_type":15,"_id":498,"_source":17,"_file":499,"_stem":500,"_extension":20},"/python-how-to/parse-xml-html","Parse XML and HTML","Learn to extract data from XML and HTML documents using Python's built-in parsing tools","parse-xml-html",53,"content:python-how-to:53.parse-xml-html.md","python-how-to/53.parse-xml-html.md","python-how-to/53.parse-xml-html",{"_path":502,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":503,"description":504,"slug":505,"parentId":473,"order":506,"_type":15,"_id":507,"_source":17,"_file":508,"_stem":509,"_extension":20},"/python-how-to/handle-api-requests","Handle API Requests","Learn to fetch and process data from web APIs using Python's urllib and external requests library","handle-api-requests",54,"content:python-how-to:54.handle-api-requests.md","python-how-to/54.handle-api-requests.md","python-how-to/54.handle-api-requests",{"_path":511,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":512,"description":513,"slug":514,"parentId":473,"order":515,"_type":15,"_id":516,"_source":17,"_file":517,"_stem":518,"_extension":20},"/python-how-to/work-databases","Work with Databases","Learn to connect to and query SQL databases using Python's sqlite3 and database techniques","work-databases",55,"content:python-how-to:55.work-databases.md","python-how-to/55.work-databases.md","python-how-to/55.work-databases",{"_path":520,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":521,"description":522,"slug":523,"parentId":473,"order":524,"_type":15,"_id":525,"_source":17,"_file":526,"_stem":527,"_extension":20},"/python-how-to/process-large-files","Process Large Files","Learn memory-efficient techniques for handling large files and datasets in Python","process-large-files",56,"content:python-how-to:56.process-large-files.md","python-how-to/56.process-large-files.md","python-how-to/56.process-large-files",{"_path":529,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":530,"description":531,"slug":532,"parentId":290,"order":533,"isParent":13,"icon":534,"_type":15,"_id":535,"_source":17,"_file":536,"_stem":537,"_extension":20,"children":538},"/python-how-to/best-practices","Best Practices","Learn Python best practices for writing clean, maintainable, and efficient code","best-practices",57,"pi pi-star","content:python-how-to:57.best-practices.md","python-how-to/57.best-practices.md","python-how-to/57.best-practices",[539,548,557,566,575,584],{"_path":540,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":541,"description":542,"slug":543,"parentId":529,"order":544,"_type":15,"_id":545,"_source":17,"_file":546,"_stem":547,"_extension":20},"/python-how-to/structure-code","Structure Your Code","Learn to organize Python code with proper module structure, functions, and classes","structure-code",58,"content:python-how-to:58.structure-code.md","python-how-to/58.structure-code.md","python-how-to/58.structure-code",{"_path":549,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":550,"description":551,"slug":552,"parentId":529,"order":553,"_type":15,"_id":554,"_source":17,"_file":555,"_stem":556,"_extension":20},"/python-how-to/write-clean-code","Write Clean Code","Learn to write readable, maintainable Python code with proper naming, comments, and clear logic","write-clean-code",59,"content:python-how-to:59.write-clean-code.md","python-how-to/59.write-clean-code.md","python-how-to/59.write-clean-code",{"_path":558,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":559,"description":560,"slug":561,"parentId":529,"order":562,"_type":15,"_id":563,"_source":17,"_file":564,"_stem":565,"_extension":20},"/python-how-to/optimize-performance","Optimize Performance","Learn to identify and fix performance bottlenecks in Python code for faster execution","optimize-performance",60,"content:python-how-to:60.optimize-performance.md","python-how-to/60.optimize-performance.md","python-how-to/60.optimize-performance",{"_path":567,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":568,"description":569,"slug":570,"parentId":529,"order":571,"_type":15,"_id":572,"_source":17,"_file":573,"_stem":574,"_extension":20},"/python-how-to/write-unit-tests","Write Unit Tests","Learn to create reliable unit tests to verify your Python code works correctly and catch bugs early","write-unit-tests",61,"content:python-how-to:61.write-unit-tests.md","python-how-to/61.write-unit-tests.md","python-how-to/61.write-unit-tests",{"_path":576,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":577,"description":578,"slug":579,"parentId":529,"order":580,"_type":15,"_id":581,"_source":17,"_file":582,"_stem":583,"_extension":20},"/python-how-to/document-code","Document Your Code","Learn to write clear documentation and helpful comments for your Python code","document-code",62,"content:python-how-to:62.document-code.md","python-how-to/62.document-code.md","python-how-to/62.document-code",{"_path":585,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":586,"description":587,"slug":588,"parentId":529,"order":589,"_type":15,"_id":590,"_source":17,"_file":591,"_stem":592,"_extension":20},"/python-how-to/use-type-hints","Use Type Hints","Learn to add type annotations to Python code for better clarity, tooling support, and error detection","use-type-hints",63,"content:python-how-to:63.use-type-hints.md","python-how-to/63.use-type-hints.md","python-how-to/63.use-type-hints",{"_path":290,"_dir":8,"_draft":7,"_partial":7,"_locale":8,"title":594,"description":595,"slug":6,"order":596,"icon":14,"_type":15,"_id":597,"_source":17,"_file":598,"_stem":599,"_extension":20},"Python How-To Guide","Practical Python tutorials for common programming tasks. Learn step-by-step solutions for string manipulation, file operations, data processing, and more with real-world examples.",0,"content:python-how-to:index.md","python-how-to/index.md","python-how-to/index",[258],{"_path":259,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":260,"description":261,"slug":262,"parentId":213,"order":263,"body":602,"_type":15,"_id":264,"_source":17,"_file":265,"_stem":266,"_extension":20},{"type":603,"children":604,"toc":4660},"root",[605,614,629,938,945,950,1052,1059,1417,1423,1735,1741,2162,2168,2173,2179,2579,2585,3353,3359,4010,4016,4311,4317,4507,4513,4654],{"type":606,"tag":607,"props":608,"children":610},"element","h1",{"id":609},"working-with-json-files",[611],{"type":612,"value":613},"text","🔗 Working with JSON Files",{"type":606,"tag":615,"props":616,"children":617},"p",{},[618,620,627],{"type":612,"value":619},"JSON (JavaScript Object Notation) is a popular data format for configuration files, APIs, and data exchange. Python's ",{"type":606,"tag":621,"props":622,"children":624},"code",{"className":623},[],[625],{"type":612,"value":626},"json",{"type":612,"value":628}," module makes it easy to work with JSON data.",{"type":606,"tag":630,"props":631,"children":632},"code-try",{},[633],{"type":606,"tag":634,"props":635,"children":639},"pre",{"className":636,"code":637,"language":638,"meta":8,"style":8},"language-python shiki shiki-themes github-light github-dark","import json\n\n# Basic JSON operations\ndata = {'name': 'Alice', 'age': 25, 'city': 'New York'}\n\n# Write to JSON file\nwith open('data.json', 'w') as file:\n    json.dump(data, file)\n\n# Read from JSON file\nwith open('data.json', 'r') as file:\n    loaded_data = json.load(file)\n    print(loaded_data)\n","python",[640],{"type":606,"tag":621,"props":641,"children":642},{"__ignoreMap":8},[643,660,668,677,754,761,769,822,840,848,856,900,925],{"type":606,"tag":644,"props":645,"children":647},"span",{"class":646,"line":12},"line",[648,654],{"type":606,"tag":644,"props":649,"children":651},{"style":650},"--shiki-default:#D73A49;--shiki-app-dark-mode:#F97583",[652],{"type":612,"value":653},"import",{"type":606,"tag":644,"props":655,"children":657},{"style":656},"--shiki-default:#24292E;--shiki-app-dark-mode:#E1E4E8",[658],{"type":612,"value":659}," json\n",{"type":606,"tag":644,"props":661,"children":662},{"class":646,"line":27},[663],{"type":606,"tag":644,"props":664,"children":665},{"emptyLinePlaceholder":13},[666],{"type":612,"value":667},"\n",{"type":606,"tag":644,"props":669,"children":670},{"class":646,"line":36},[671],{"type":606,"tag":644,"props":672,"children":674},{"style":673},"--shiki-default:#6A737D;--shiki-app-dark-mode:#6A737D",[675],{"type":612,"value":676},"# Basic JSON operations\n",{"type":606,"tag":644,"props":678,"children":679},{"class":646,"line":45},[680,685,690,695,701,706,711,716,721,725,731,735,740,744,749],{"type":606,"tag":644,"props":681,"children":682},{"style":656},[683],{"type":612,"value":684},"data ",{"type":606,"tag":644,"props":686,"children":687},{"style":650},[688],{"type":612,"value":689},"=",{"type":606,"tag":644,"props":691,"children":692},{"style":656},[693],{"type":612,"value":694}," {",{"type":606,"tag":644,"props":696,"children":698},{"style":697},"--shiki-default:#032F62;--shiki-app-dark-mode:#9ECBFF",[699],{"type":612,"value":700},"'name'",{"type":606,"tag":644,"props":702,"children":703},{"style":656},[704],{"type":612,"value":705},": ",{"type":606,"tag":644,"props":707,"children":708},{"style":697},[709],{"type":612,"value":710},"'Alice'",{"type":606,"tag":644,"props":712,"children":713},{"style":656},[714],{"type":612,"value":715},", ",{"type":606,"tag":644,"props":717,"children":718},{"style":697},[719],{"type":612,"value":720},"'age'",{"type":606,"tag":644,"props":722,"children":723},{"style":656},[724],{"type":612,"value":705},{"type":606,"tag":644,"props":726,"children":728},{"style":727},"--shiki-default:#005CC5;--shiki-app-dark-mode:#79B8FF",[729],{"type":612,"value":730},"25",{"type":606,"tag":644,"props":732,"children":733},{"style":656},[734],{"type":612,"value":715},{"type":606,"tag":644,"props":736,"children":737},{"style":697},[738],{"type":612,"value":739},"'city'",{"type":606,"tag":644,"props":741,"children":742},{"style":656},[743],{"type":612,"value":705},{"type":606,"tag":644,"props":745,"children":746},{"style":697},[747],{"type":612,"value":748},"'New York'",{"type":606,"tag":644,"props":750,"children":751},{"style":656},[752],{"type":612,"value":753},"}\n",{"type":606,"tag":644,"props":755,"children":756},{"class":646,"line":54},[757],{"type":606,"tag":644,"props":758,"children":759},{"emptyLinePlaceholder":13},[760],{"type":612,"value":667},{"type":606,"tag":644,"props":762,"children":763},{"class":646,"line":63},[764],{"type":606,"tag":644,"props":765,"children":766},{"style":673},[767],{"type":612,"value":768},"# Write to JSON file\n",{"type":606,"tag":644,"props":770,"children":771},{"class":646,"line":72},[772,777,782,787,792,796,801,806,811,817],{"type":606,"tag":644,"props":773,"children":774},{"style":650},[775],{"type":612,"value":776},"with",{"type":606,"tag":644,"props":778,"children":779},{"style":727},[780],{"type":612,"value":781}," open",{"type":606,"tag":644,"props":783,"children":784},{"style":656},[785],{"type":612,"value":786},"(",{"type":606,"tag":644,"props":788,"children":789},{"style":697},[790],{"type":612,"value":791},"'data.json'",{"type":606,"tag":644,"props":793,"children":794},{"style":656},[795],{"type":612,"value":715},{"type":606,"tag":644,"props":797,"children":798},{"style":697},[799],{"type":612,"value":800},"'w'",{"type":606,"tag":644,"props":802,"children":803},{"style":656},[804],{"type":612,"value":805},") ",{"type":606,"tag":644,"props":807,"children":808},{"style":650},[809],{"type":612,"value":810},"as",{"type":606,"tag":644,"props":812,"children":814},{"style":813},"--shiki-default:#E36209;--shiki-app-dark-mode:#FFAB70",[815],{"type":612,"value":816}," file",{"type":606,"tag":644,"props":818,"children":819},{"style":656},[820],{"type":612,"value":821},":\n",{"type":606,"tag":644,"props":823,"children":824},{"class":646,"line":81},[825,830,835],{"type":606,"tag":644,"props":826,"children":827},{"style":656},[828],{"type":612,"value":829},"    json.dump(data, ",{"type":606,"tag":644,"props":831,"children":832},{"style":813},[833],{"type":612,"value":834},"file",{"type":606,"tag":644,"props":836,"children":837},{"style":656},[838],{"type":612,"value":839},")\n",{"type":606,"tag":644,"props":841,"children":843},{"class":646,"line":842},9,[844],{"type":606,"tag":644,"props":845,"children":846},{"emptyLinePlaceholder":13},[847],{"type":612,"value":667},{"type":606,"tag":644,"props":849,"children":850},{"class":646,"line":99},[851],{"type":606,"tag":644,"props":852,"children":853},{"style":673},[854],{"type":612,"value":855},"# Read from JSON file\n",{"type":606,"tag":644,"props":857,"children":858},{"class":646,"line":108},[859,863,867,871,875,879,884,888,892,896],{"type":606,"tag":644,"props":860,"children":861},{"style":650},[862],{"type":612,"value":776},{"type":606,"tag":644,"props":864,"children":865},{"style":727},[866],{"type":612,"value":781},{"type":606,"tag":644,"props":868,"children":869},{"style":656},[870],{"type":612,"value":786},{"type":606,"tag":644,"props":872,"children":873},{"style":697},[874],{"type":612,"value":791},{"type":606,"tag":644,"props":876,"children":877},{"style":656},[878],{"type":612,"value":715},{"type":606,"tag":644,"props":880,"children":881},{"style":697},[882],{"type":612,"value":883},"'r'",{"type":606,"tag":644,"props":885,"children":886},{"style":656},[887],{"type":612,"value":805},{"type":606,"tag":644,"props":889,"children":890},{"style":650},[891],{"type":612,"value":810},{"type":606,"tag":644,"props":893,"children":894},{"style":813},[895],{"type":612,"value":816},{"type":606,"tag":644,"props":897,"children":898},{"style":656},[899],{"type":612,"value":821},{"type":606,"tag":644,"props":901,"children":902},{"class":646,"line":117},[903,908,912,917,921],{"type":606,"tag":644,"props":904,"children":905},{"style":656},[906],{"type":612,"value":907},"    loaded_data ",{"type":606,"tag":644,"props":909,"children":910},{"style":650},[911],{"type":612,"value":689},{"type":606,"tag":644,"props":913,"children":914},{"style":656},[915],{"type":612,"value":916}," json.load(",{"type":606,"tag":644,"props":918,"children":919},{"style":813},[920],{"type":612,"value":834},{"type":606,"tag":644,"props":922,"children":923},{"style":656},[924],{"type":612,"value":839},{"type":606,"tag":644,"props":926,"children":927},{"class":646,"line":126},[928,933],{"type":606,"tag":644,"props":929,"children":930},{"style":727},[931],{"type":612,"value":932},"    print",{"type":606,"tag":644,"props":934,"children":935},{"style":656},[936],{"type":612,"value":937},"(loaded_data)\n",{"type":606,"tag":939,"props":940,"children":942},"h2",{"id":941},"json-operations",[943],{"type":612,"value":944},"🎯 JSON Operations",{"type":606,"tag":615,"props":946,"children":947},{},[948],{"type":612,"value":949},"Python offers several approaches to work with JSON data.",{"type":606,"tag":951,"props":952,"children":956},"info-box",{"emoji":953,"title":954,"type":955},"📝","JSON Module Functions","info",[957,966,993,1001,1026,1034],{"type":606,"tag":615,"props":958,"children":959},{},[960],{"type":606,"tag":961,"props":962,"children":963},"strong",{},[964],{"type":612,"value":965},"File Operations:",{"type":606,"tag":967,"props":968,"children":969},"ul",{},[970,982],{"type":606,"tag":971,"props":972,"children":973},"li",{},[974,980],{"type":606,"tag":621,"props":975,"children":977},{"className":976},[],[978],{"type":612,"value":979},"json.dump()",{"type":612,"value":981},": Write object to file",{"type":606,"tag":971,"props":983,"children":984},{},[985,991],{"type":606,"tag":621,"props":986,"children":988},{"className":987},[],[989],{"type":612,"value":990},"json.load()",{"type":612,"value":992},": Read object from file",{"type":606,"tag":615,"props":994,"children":995},{},[996],{"type":606,"tag":961,"props":997,"children":998},{},[999],{"type":612,"value":1000},"String Operations:",{"type":606,"tag":967,"props":1002,"children":1003},{},[1004,1015],{"type":606,"tag":971,"props":1005,"children":1006},{},[1007,1013],{"type":606,"tag":621,"props":1008,"children":1010},{"className":1009},[],[1011],{"type":612,"value":1012},"json.dumps()",{"type":612,"value":1014},": Convert to JSON string",{"type":606,"tag":971,"props":1016,"children":1017},{},[1018,1024],{"type":606,"tag":621,"props":1019,"children":1021},{"className":1020},[],[1022],{"type":612,"value":1023},"json.loads()",{"type":612,"value":1025},": Parse JSON string",{"type":606,"tag":615,"props":1027,"children":1028},{},[1029],{"type":606,"tag":961,"props":1030,"children":1031},{},[1032],{"type":612,"value":1033},"Key Features:",{"type":606,"tag":967,"props":1035,"children":1036},{},[1037,1042,1047],{"type":606,"tag":971,"props":1038,"children":1039},{},[1040],{"type":612,"value":1041},"Automatic type conversion",{"type":606,"tag":971,"props":1043,"children":1044},{},[1045],{"type":612,"value":1046},"Pretty printing options",{"type":606,"tag":971,"props":1048,"children":1049},{},[1050],{"type":612,"value":1051},"Error handling for invalid JSON",{"type":606,"tag":1053,"props":1054,"children":1056},"h3",{"id":1055},"working-with-data-types",[1057],{"type":612,"value":1058},"Working with Data Types",{"type":606,"tag":630,"props":1060,"children":1061},{},[1062],{"type":606,"tag":634,"props":1063,"children":1065},{"className":636,"code":1064,"language":638,"meta":8,"style":8},"import json\n\n# JSON with different data types\ndata = {\n    'name': 'Alice',\n    'age': 25,\n    'grades': [85, 92, 78],\n    'is_student': True,\n    'address': {\n        'street': '123 Main St',\n        'city': 'New York'\n    }\n}\n\n# Write JSON with formatting\nwith open('formatted.json', 'w') as file:\n    json.dump(data, file, indent=4, sort_keys=True)\n\nprint(\"JSON file written with formatting\")\n",[1066],{"type":606,"tag":621,"props":1067,"children":1068},{"__ignoreMap":8},[1069,1080,1087,1095,1111,1132,1152,1193,1214,1227,1248,1265,1273,1280,1287,1295,1339,1389,1396],{"type":606,"tag":644,"props":1070,"children":1071},{"class":646,"line":12},[1072,1076],{"type":606,"tag":644,"props":1073,"children":1074},{"style":650},[1075],{"type":612,"value":653},{"type":606,"tag":644,"props":1077,"children":1078},{"style":656},[1079],{"type":612,"value":659},{"type":606,"tag":644,"props":1081,"children":1082},{"class":646,"line":27},[1083],{"type":606,"tag":644,"props":1084,"children":1085},{"emptyLinePlaceholder":13},[1086],{"type":612,"value":667},{"type":606,"tag":644,"props":1088,"children":1089},{"class":646,"line":36},[1090],{"type":606,"tag":644,"props":1091,"children":1092},{"style":673},[1093],{"type":612,"value":1094},"# JSON with different data types\n",{"type":606,"tag":644,"props":1096,"children":1097},{"class":646,"line":45},[1098,1102,1106],{"type":606,"tag":644,"props":1099,"children":1100},{"style":656},[1101],{"type":612,"value":684},{"type":606,"tag":644,"props":1103,"children":1104},{"style":650},[1105],{"type":612,"value":689},{"type":606,"tag":644,"props":1107,"children":1108},{"style":656},[1109],{"type":612,"value":1110}," {\n",{"type":606,"tag":644,"props":1112,"children":1113},{"class":646,"line":54},[1114,1119,1123,1127],{"type":606,"tag":644,"props":1115,"children":1116},{"style":697},[1117],{"type":612,"value":1118},"    'name'",{"type":606,"tag":644,"props":1120,"children":1121},{"style":656},[1122],{"type":612,"value":705},{"type":606,"tag":644,"props":1124,"children":1125},{"style":697},[1126],{"type":612,"value":710},{"type":606,"tag":644,"props":1128,"children":1129},{"style":656},[1130],{"type":612,"value":1131},",\n",{"type":606,"tag":644,"props":1133,"children":1134},{"class":646,"line":63},[1135,1140,1144,1148],{"type":606,"tag":644,"props":1136,"children":1137},{"style":697},[1138],{"type":612,"value":1139},"    'age'",{"type":606,"tag":644,"props":1141,"children":1142},{"style":656},[1143],{"type":612,"value":705},{"type":606,"tag":644,"props":1145,"children":1146},{"style":727},[1147],{"type":612,"value":730},{"type":606,"tag":644,"props":1149,"children":1150},{"style":656},[1151],{"type":612,"value":1131},{"type":606,"tag":644,"props":1153,"children":1154},{"class":646,"line":72},[1155,1160,1165,1170,1174,1179,1183,1188],{"type":606,"tag":644,"props":1156,"children":1157},{"style":697},[1158],{"type":612,"value":1159},"    'grades'",{"type":606,"tag":644,"props":1161,"children":1162},{"style":656},[1163],{"type":612,"value":1164},": [",{"type":606,"tag":644,"props":1166,"children":1167},{"style":727},[1168],{"type":612,"value":1169},"85",{"type":606,"tag":644,"props":1171,"children":1172},{"style":656},[1173],{"type":612,"value":715},{"type":606,"tag":644,"props":1175,"children":1176},{"style":727},[1177],{"type":612,"value":1178},"92",{"type":606,"tag":644,"props":1180,"children":1181},{"style":656},[1182],{"type":612,"value":715},{"type":606,"tag":644,"props":1184,"children":1185},{"style":727},[1186],{"type":612,"value":1187},"78",{"type":606,"tag":644,"props":1189,"children":1190},{"style":656},[1191],{"type":612,"value":1192},"],\n",{"type":606,"tag":644,"props":1194,"children":1195},{"class":646,"line":81},[1196,1201,1205,1210],{"type":606,"tag":644,"props":1197,"children":1198},{"style":697},[1199],{"type":612,"value":1200},"    'is_student'",{"type":606,"tag":644,"props":1202,"children":1203},{"style":656},[1204],{"type":612,"value":705},{"type":606,"tag":644,"props":1206,"children":1207},{"style":727},[1208],{"type":612,"value":1209},"True",{"type":606,"tag":644,"props":1211,"children":1212},{"style":656},[1213],{"type":612,"value":1131},{"type":606,"tag":644,"props":1215,"children":1216},{"class":646,"line":842},[1217,1222],{"type":606,"tag":644,"props":1218,"children":1219},{"style":697},[1220],{"type":612,"value":1221},"    'address'",{"type":606,"tag":644,"props":1223,"children":1224},{"style":656},[1225],{"type":612,"value":1226},": {\n",{"type":606,"tag":644,"props":1228,"children":1229},{"class":646,"line":99},[1230,1235,1239,1244],{"type":606,"tag":644,"props":1231,"children":1232},{"style":697},[1233],{"type":612,"value":1234},"        'street'",{"type":606,"tag":644,"props":1236,"children":1237},{"style":656},[1238],{"type":612,"value":705},{"type":606,"tag":644,"props":1240,"children":1241},{"style":697},[1242],{"type":612,"value":1243},"'123 Main St'",{"type":606,"tag":644,"props":1245,"children":1246},{"style":656},[1247],{"type":612,"value":1131},{"type":606,"tag":644,"props":1249,"children":1250},{"class":646,"line":108},[1251,1256,1260],{"type":606,"tag":644,"props":1252,"children":1253},{"style":697},[1254],{"type":612,"value":1255},"        'city'",{"type":606,"tag":644,"props":1257,"children":1258},{"style":656},[1259],{"type":612,"value":705},{"type":606,"tag":644,"props":1261,"children":1262},{"style":697},[1263],{"type":612,"value":1264},"'New York'\n",{"type":606,"tag":644,"props":1266,"children":1267},{"class":646,"line":117},[1268],{"type":606,"tag":644,"props":1269,"children":1270},{"style":656},[1271],{"type":612,"value":1272},"    }\n",{"type":606,"tag":644,"props":1274,"children":1275},{"class":646,"line":126},[1276],{"type":606,"tag":644,"props":1277,"children":1278},{"style":656},[1279],{"type":612,"value":753},{"type":606,"tag":644,"props":1281,"children":1282},{"class":646,"line":135},[1283],{"type":606,"tag":644,"props":1284,"children":1285},{"emptyLinePlaceholder":13},[1286],{"type":612,"value":667},{"type":606,"tag":644,"props":1288,"children":1289},{"class":646,"line":144},[1290],{"type":606,"tag":644,"props":1291,"children":1292},{"style":673},[1293],{"type":612,"value":1294},"# Write JSON with formatting\n",{"type":606,"tag":644,"props":1296,"children":1297},{"class":646,"line":153},[1298,1302,1306,1310,1315,1319,1323,1327,1331,1335],{"type":606,"tag":644,"props":1299,"children":1300},{"style":650},[1301],{"type":612,"value":776},{"type":606,"tag":644,"props":1303,"children":1304},{"style":727},[1305],{"type":612,"value":781},{"type":606,"tag":644,"props":1307,"children":1308},{"style":656},[1309],{"type":612,"value":786},{"type":606,"tag":644,"props":1311,"children":1312},{"style":697},[1313],{"type":612,"value":1314},"'formatted.json'",{"type":606,"tag":644,"props":1316,"children":1317},{"style":656},[1318],{"type":612,"value":715},{"type":606,"tag":644,"props":1320,"children":1321},{"style":697},[1322],{"type":612,"value":800},{"type":606,"tag":644,"props":1324,"children":1325},{"style":656},[1326],{"type":612,"value":805},{"type":606,"tag":644,"props":1328,"children":1329},{"style":650},[1330],{"type":612,"value":810},{"type":606,"tag":644,"props":1332,"children":1333},{"style":813},[1334],{"type":612,"value":816},{"type":606,"tag":644,"props":1336,"children":1337},{"style":656},[1338],{"type":612,"value":821},{"type":606,"tag":644,"props":1340,"children":1341},{"class":646,"line":163},[1342,1346,1350,1354,1359,1363,1368,1372,1377,1381,1385],{"type":606,"tag":644,"props":1343,"children":1344},{"style":656},[1345],{"type":612,"value":829},{"type":606,"tag":644,"props":1347,"children":1348},{"style":813},[1349],{"type":612,"value":834},{"type":606,"tag":644,"props":1351,"children":1352},{"style":656},[1353],{"type":612,"value":715},{"type":606,"tag":644,"props":1355,"children":1356},{"style":813},[1357],{"type":612,"value":1358},"indent",{"type":606,"tag":644,"props":1360,"children":1361},{"style":650},[1362],{"type":612,"value":689},{"type":606,"tag":644,"props":1364,"children":1365},{"style":727},[1366],{"type":612,"value":1367},"4",{"type":606,"tag":644,"props":1369,"children":1370},{"style":656},[1371],{"type":612,"value":715},{"type":606,"tag":644,"props":1373,"children":1374},{"style":813},[1375],{"type":612,"value":1376},"sort_keys",{"type":606,"tag":644,"props":1378,"children":1379},{"style":650},[1380],{"type":612,"value":689},{"type":606,"tag":644,"props":1382,"children":1383},{"style":727},[1384],{"type":612,"value":1209},{"type":606,"tag":644,"props":1386,"children":1387},{"style":656},[1388],{"type":612,"value":839},{"type":606,"tag":644,"props":1390,"children":1391},{"class":646,"line":172},[1392],{"type":606,"tag":644,"props":1393,"children":1394},{"emptyLinePlaceholder":13},[1395],{"type":612,"value":667},{"type":606,"tag":644,"props":1397,"children":1398},{"class":646,"line":181},[1399,1404,1408,1413],{"type":606,"tag":644,"props":1400,"children":1401},{"style":727},[1402],{"type":612,"value":1403},"print",{"type":606,"tag":644,"props":1405,"children":1406},{"style":656},[1407],{"type":612,"value":786},{"type":606,"tag":644,"props":1409,"children":1410},{"style":697},[1411],{"type":612,"value":1412},"\"JSON file written with formatting\"",{"type":606,"tag":644,"props":1414,"children":1415},{"style":656},[1416],{"type":612,"value":839},{"type":606,"tag":1053,"props":1418,"children":1420},{"id":1419},"reading-and-string-operations",[1421],{"type":612,"value":1422},"Reading and String Operations",{"type":606,"tag":630,"props":1424,"children":1425},{},[1426],{"type":606,"tag":634,"props":1427,"children":1429},{"className":636,"code":1428,"language":638,"meta":8,"style":8},"# Read JSON file\nwith open('formatted.json', 'r') as file:\n    loaded_data = json.load(file)\n    print(f\"Loaded data: {loaded_data}\")\n\n# Working with JSON strings\njson_string = json.dumps(data, indent=2)\nprint(f\"JSON string (first 100 chars):\\n{json_string[:100]}...\")\n\n# Parse JSON string\nparsed_data = json.loads(json_string)\nprint(f\"Parsed name: {parsed_data['name']}\")\n",[1430],{"type":606,"tag":621,"props":1431,"children":1432},{"__ignoreMap":8},[1433,1441,1484,1507,1552,1559,1567,1601,1654,1661,1669,1686],{"type":606,"tag":644,"props":1434,"children":1435},{"class":646,"line":12},[1436],{"type":606,"tag":644,"props":1437,"children":1438},{"style":673},[1439],{"type":612,"value":1440},"# Read JSON file\n",{"type":606,"tag":644,"props":1442,"children":1443},{"class":646,"line":27},[1444,1448,1452,1456,1460,1464,1468,1472,1476,1480],{"type":606,"tag":644,"props":1445,"children":1446},{"style":650},[1447],{"type":612,"value":776},{"type":606,"tag":644,"props":1449,"children":1450},{"style":727},[1451],{"type":612,"value":781},{"type":606,"tag":644,"props":1453,"children":1454},{"style":656},[1455],{"type":612,"value":786},{"type":606,"tag":644,"props":1457,"children":1458},{"style":697},[1459],{"type":612,"value":1314},{"type":606,"tag":644,"props":1461,"children":1462},{"style":656},[1463],{"type":612,"value":715},{"type":606,"tag":644,"props":1465,"children":1466},{"style":697},[1467],{"type":612,"value":883},{"type":606,"tag":644,"props":1469,"children":1470},{"style":656},[1471],{"type":612,"value":805},{"type":606,"tag":644,"props":1473,"children":1474},{"style":650},[1475],{"type":612,"value":810},{"type":606,"tag":644,"props":1477,"children":1478},{"style":813},[1479],{"type":612,"value":816},{"type":606,"tag":644,"props":1481,"children":1482},{"style":656},[1483],{"type":612,"value":821},{"type":606,"tag":644,"props":1485,"children":1486},{"class":646,"line":36},[1487,1491,1495,1499,1503],{"type":606,"tag":644,"props":1488,"children":1489},{"style":656},[1490],{"type":612,"value":907},{"type":606,"tag":644,"props":1492,"children":1493},{"style":650},[1494],{"type":612,"value":689},{"type":606,"tag":644,"props":1496,"children":1497},{"style":656},[1498],{"type":612,"value":916},{"type":606,"tag":644,"props":1500,"children":1501},{"style":813},[1502],{"type":612,"value":834},{"type":606,"tag":644,"props":1504,"children":1505},{"style":656},[1506],{"type":612,"value":839},{"type":606,"tag":644,"props":1508,"children":1509},{"class":646,"line":45},[1510,1514,1518,1523,1528,1533,1538,1543,1548],{"type":606,"tag":644,"props":1511,"children":1512},{"style":727},[1513],{"type":612,"value":932},{"type":606,"tag":644,"props":1515,"children":1516},{"style":656},[1517],{"type":612,"value":786},{"type":606,"tag":644,"props":1519,"children":1520},{"style":650},[1521],{"type":612,"value":1522},"f",{"type":606,"tag":644,"props":1524,"children":1525},{"style":697},[1526],{"type":612,"value":1527},"\"Loaded data: ",{"type":606,"tag":644,"props":1529,"children":1530},{"style":727},[1531],{"type":612,"value":1532},"{",{"type":606,"tag":644,"props":1534,"children":1535},{"style":656},[1536],{"type":612,"value":1537},"loaded_data",{"type":606,"tag":644,"props":1539,"children":1540},{"style":727},[1541],{"type":612,"value":1542},"}",{"type":606,"tag":644,"props":1544,"children":1545},{"style":697},[1546],{"type":612,"value":1547},"\"",{"type":606,"tag":644,"props":1549,"children":1550},{"style":656},[1551],{"type":612,"value":839},{"type":606,"tag":644,"props":1553,"children":1554},{"class":646,"line":54},[1555],{"type":606,"tag":644,"props":1556,"children":1557},{"emptyLinePlaceholder":13},[1558],{"type":612,"value":667},{"type":606,"tag":644,"props":1560,"children":1561},{"class":646,"line":63},[1562],{"type":606,"tag":644,"props":1563,"children":1564},{"style":673},[1565],{"type":612,"value":1566},"# Working with JSON strings\n",{"type":606,"tag":644,"props":1568,"children":1569},{"class":646,"line":72},[1570,1575,1579,1584,1588,1592,1597],{"type":606,"tag":644,"props":1571,"children":1572},{"style":656},[1573],{"type":612,"value":1574},"json_string ",{"type":606,"tag":644,"props":1576,"children":1577},{"style":650},[1578],{"type":612,"value":689},{"type":606,"tag":644,"props":1580,"children":1581},{"style":656},[1582],{"type":612,"value":1583}," json.dumps(data, ",{"type":606,"tag":644,"props":1585,"children":1586},{"style":813},[1587],{"type":612,"value":1358},{"type":606,"tag":644,"props":1589,"children":1590},{"style":650},[1591],{"type":612,"value":689},{"type":606,"tag":644,"props":1593,"children":1594},{"style":727},[1595],{"type":612,"value":1596},"2",{"type":606,"tag":644,"props":1598,"children":1599},{"style":656},[1600],{"type":612,"value":839},{"type":606,"tag":644,"props":1602,"children":1603},{"class":646,"line":81},[1604,1608,1612,1616,1621,1626,1631,1636,1641,1645,1650],{"type":606,"tag":644,"props":1605,"children":1606},{"style":727},[1607],{"type":612,"value":1403},{"type":606,"tag":644,"props":1609,"children":1610},{"style":656},[1611],{"type":612,"value":786},{"type":606,"tag":644,"props":1613,"children":1614},{"style":650},[1615],{"type":612,"value":1522},{"type":606,"tag":644,"props":1617,"children":1618},{"style":697},[1619],{"type":612,"value":1620},"\"JSON string (first 100 chars):",{"type":606,"tag":644,"props":1622,"children":1623},{"style":727},[1624],{"type":612,"value":1625},"\\n{",{"type":606,"tag":644,"props":1627,"children":1628},{"style":656},[1629],{"type":612,"value":1630},"json_string[:",{"type":606,"tag":644,"props":1632,"children":1633},{"style":727},[1634],{"type":612,"value":1635},"100",{"type":606,"tag":644,"props":1637,"children":1638},{"style":656},[1639],{"type":612,"value":1640},"]",{"type":606,"tag":644,"props":1642,"children":1643},{"style":727},[1644],{"type":612,"value":1542},{"type":606,"tag":644,"props":1646,"children":1647},{"style":697},[1648],{"type":612,"value":1649},"...\"",{"type":606,"tag":644,"props":1651,"children":1652},{"style":656},[1653],{"type":612,"value":839},{"type":606,"tag":644,"props":1655,"children":1656},{"class":646,"line":842},[1657],{"type":606,"tag":644,"props":1658,"children":1659},{"emptyLinePlaceholder":13},[1660],{"type":612,"value":667},{"type":606,"tag":644,"props":1662,"children":1663},{"class":646,"line":99},[1664],{"type":606,"tag":644,"props":1665,"children":1666},{"style":673},[1667],{"type":612,"value":1668},"# Parse JSON string\n",{"type":606,"tag":644,"props":1670,"children":1671},{"class":646,"line":108},[1672,1677,1681],{"type":606,"tag":644,"props":1673,"children":1674},{"style":656},[1675],{"type":612,"value":1676},"parsed_data ",{"type":606,"tag":644,"props":1678,"children":1679},{"style":650},[1680],{"type":612,"value":689},{"type":606,"tag":644,"props":1682,"children":1683},{"style":656},[1684],{"type":612,"value":1685}," json.loads(json_string)\n",{"type":606,"tag":644,"props":1687,"children":1688},{"class":646,"line":117},[1689,1693,1697,1701,1706,1710,1715,1719,1723,1727,1731],{"type":606,"tag":644,"props":1690,"children":1691},{"style":727},[1692],{"type":612,"value":1403},{"type":606,"tag":644,"props":1694,"children":1695},{"style":656},[1696],{"type":612,"value":786},{"type":606,"tag":644,"props":1698,"children":1699},{"style":650},[1700],{"type":612,"value":1522},{"type":606,"tag":644,"props":1702,"children":1703},{"style":697},[1704],{"type":612,"value":1705},"\"Parsed name: ",{"type":606,"tag":644,"props":1707,"children":1708},{"style":727},[1709],{"type":612,"value":1532},{"type":606,"tag":644,"props":1711,"children":1712},{"style":656},[1713],{"type":612,"value":1714},"parsed_data[",{"type":606,"tag":644,"props":1716,"children":1717},{"style":697},[1718],{"type":612,"value":700},{"type":606,"tag":644,"props":1720,"children":1721},{"style":656},[1722],{"type":612,"value":1640},{"type":606,"tag":644,"props":1724,"children":1725},{"style":727},[1726],{"type":612,"value":1542},{"type":606,"tag":644,"props":1728,"children":1729},{"style":697},[1730],{"type":612,"value":1547},{"type":606,"tag":644,"props":1732,"children":1733},{"style":656},[1734],{"type":612,"value":839},{"type":606,"tag":1053,"props":1736,"children":1738},{"id":1737},"working-with-lists",[1739],{"type":612,"value":1740},"Working with Lists",{"type":606,"tag":630,"props":1742,"children":1743},{},[1744],{"type":606,"tag":634,"props":1745,"children":1747},{"className":636,"code":1746,"language":638,"meta":8,"style":8},"# JSON with list data\nstudents = [\n    {'name': 'Alice', 'grade': 'A'},\n    {'name': 'Bob', 'grade': 'B'},\n    {'name': 'Charlie', 'grade': 'C'}\n]\n\nwith open('students.json', 'w') as file:\n    json.dump(students, file, indent=2)\n\nwith open('students.json', 'r') as file:\n    student_list = json.load(file)\n    for student in student_list:\n        print(f\"{student['name']}: {student['grade']}\")\n",[1748],{"type":606,"tag":621,"props":1749,"children":1750},{"__ignoreMap":8},[1751,1759,1776,1819,1860,1901,1909,1916,1960,1992,1999,2042,2066,2089],{"type":606,"tag":644,"props":1752,"children":1753},{"class":646,"line":12},[1754],{"type":606,"tag":644,"props":1755,"children":1756},{"style":673},[1757],{"type":612,"value":1758},"# JSON with list data\n",{"type":606,"tag":644,"props":1760,"children":1761},{"class":646,"line":27},[1762,1767,1771],{"type":606,"tag":644,"props":1763,"children":1764},{"style":656},[1765],{"type":612,"value":1766},"students ",{"type":606,"tag":644,"props":1768,"children":1769},{"style":650},[1770],{"type":612,"value":689},{"type":606,"tag":644,"props":1772,"children":1773},{"style":656},[1774],{"type":612,"value":1775}," [\n",{"type":606,"tag":644,"props":1777,"children":1778},{"class":646,"line":36},[1779,1784,1788,1792,1796,1800,1805,1809,1814],{"type":606,"tag":644,"props":1780,"children":1781},{"style":656},[1782],{"type":612,"value":1783},"    {",{"type":606,"tag":644,"props":1785,"children":1786},{"style":697},[1787],{"type":612,"value":700},{"type":606,"tag":644,"props":1789,"children":1790},{"style":656},[1791],{"type":612,"value":705},{"type":606,"tag":644,"props":1793,"children":1794},{"style":697},[1795],{"type":612,"value":710},{"type":606,"tag":644,"props":1797,"children":1798},{"style":656},[1799],{"type":612,"value":715},{"type":606,"tag":644,"props":1801,"children":1802},{"style":697},[1803],{"type":612,"value":1804},"'grade'",{"type":606,"tag":644,"props":1806,"children":1807},{"style":656},[1808],{"type":612,"value":705},{"type":606,"tag":644,"props":1810,"children":1811},{"style":697},[1812],{"type":612,"value":1813},"'A'",{"type":606,"tag":644,"props":1815,"children":1816},{"style":656},[1817],{"type":612,"value":1818},"},\n",{"type":606,"tag":644,"props":1820,"children":1821},{"class":646,"line":45},[1822,1826,1830,1834,1839,1843,1847,1851,1856],{"type":606,"tag":644,"props":1823,"children":1824},{"style":656},[1825],{"type":612,"value":1783},{"type":606,"tag":644,"props":1827,"children":1828},{"style":697},[1829],{"type":612,"value":700},{"type":606,"tag":644,"props":1831,"children":1832},{"style":656},[1833],{"type":612,"value":705},{"type":606,"tag":644,"props":1835,"children":1836},{"style":697},[1837],{"type":612,"value":1838},"'Bob'",{"type":606,"tag":644,"props":1840,"children":1841},{"style":656},[1842],{"type":612,"value":715},{"type":606,"tag":644,"props":1844,"children":1845},{"style":697},[1846],{"type":612,"value":1804},{"type":606,"tag":644,"props":1848,"children":1849},{"style":656},[1850],{"type":612,"value":705},{"type":606,"tag":644,"props":1852,"children":1853},{"style":697},[1854],{"type":612,"value":1855},"'B'",{"type":606,"tag":644,"props":1857,"children":1858},{"style":656},[1859],{"type":612,"value":1818},{"type":606,"tag":644,"props":1861,"children":1862},{"class":646,"line":54},[1863,1867,1871,1875,1880,1884,1888,1892,1897],{"type":606,"tag":644,"props":1864,"children":1865},{"style":656},[1866],{"type":612,"value":1783},{"type":606,"tag":644,"props":1868,"children":1869},{"style":697},[1870],{"type":612,"value":700},{"type":606,"tag":644,"props":1872,"children":1873},{"style":656},[1874],{"type":612,"value":705},{"type":606,"tag":644,"props":1876,"children":1877},{"style":697},[1878],{"type":612,"value":1879},"'Charlie'",{"type":606,"tag":644,"props":1881,"children":1882},{"style":656},[1883],{"type":612,"value":715},{"type":606,"tag":644,"props":1885,"children":1886},{"style":697},[1887],{"type":612,"value":1804},{"type":606,"tag":644,"props":1889,"children":1890},{"style":656},[1891],{"type":612,"value":705},{"type":606,"tag":644,"props":1893,"children":1894},{"style":697},[1895],{"type":612,"value":1896},"'C'",{"type":606,"tag":644,"props":1898,"children":1899},{"style":656},[1900],{"type":612,"value":753},{"type":606,"tag":644,"props":1902,"children":1903},{"class":646,"line":63},[1904],{"type":606,"tag":644,"props":1905,"children":1906},{"style":656},[1907],{"type":612,"value":1908},"]\n",{"type":606,"tag":644,"props":1910,"children":1911},{"class":646,"line":72},[1912],{"type":606,"tag":644,"props":1913,"children":1914},{"emptyLinePlaceholder":13},[1915],{"type":612,"value":667},{"type":606,"tag":644,"props":1917,"children":1918},{"class":646,"line":81},[1919,1923,1927,1931,1936,1940,1944,1948,1952,1956],{"type":606,"tag":644,"props":1920,"children":1921},{"style":650},[1922],{"type":612,"value":776},{"type":606,"tag":644,"props":1924,"children":1925},{"style":727},[1926],{"type":612,"value":781},{"type":606,"tag":644,"props":1928,"children":1929},{"style":656},[1930],{"type":612,"value":786},{"type":606,"tag":644,"props":1932,"children":1933},{"style":697},[1934],{"type":612,"value":1935},"'students.json'",{"type":606,"tag":644,"props":1937,"children":1938},{"style":656},[1939],{"type":612,"value":715},{"type":606,"tag":644,"props":1941,"children":1942},{"style":697},[1943],{"type":612,"value":800},{"type":606,"tag":644,"props":1945,"children":1946},{"style":656},[1947],{"type":612,"value":805},{"type":606,"tag":644,"props":1949,"children":1950},{"style":650},[1951],{"type":612,"value":810},{"type":606,"tag":644,"props":1953,"children":1954},{"style":813},[1955],{"type":612,"value":816},{"type":606,"tag":644,"props":1957,"children":1958},{"style":656},[1959],{"type":612,"value":821},{"type":606,"tag":644,"props":1961,"children":1962},{"class":646,"line":842},[1963,1968,1972,1976,1980,1984,1988],{"type":606,"tag":644,"props":1964,"children":1965},{"style":656},[1966],{"type":612,"value":1967},"    json.dump(students, ",{"type":606,"tag":644,"props":1969,"children":1970},{"style":813},[1971],{"type":612,"value":834},{"type":606,"tag":644,"props":1973,"children":1974},{"style":656},[1975],{"type":612,"value":715},{"type":606,"tag":644,"props":1977,"children":1978},{"style":813},[1979],{"type":612,"value":1358},{"type":606,"tag":644,"props":1981,"children":1982},{"style":650},[1983],{"type":612,"value":689},{"type":606,"tag":644,"props":1985,"children":1986},{"style":727},[1987],{"type":612,"value":1596},{"type":606,"tag":644,"props":1989,"children":1990},{"style":656},[1991],{"type":612,"value":839},{"type":606,"tag":644,"props":1993,"children":1994},{"class":646,"line":99},[1995],{"type":606,"tag":644,"props":1996,"children":1997},{"emptyLinePlaceholder":13},[1998],{"type":612,"value":667},{"type":606,"tag":644,"props":2000,"children":2001},{"class":646,"line":108},[2002,2006,2010,2014,2018,2022,2026,2030,2034,2038],{"type":606,"tag":644,"props":2003,"children":2004},{"style":650},[2005],{"type":612,"value":776},{"type":606,"tag":644,"props":2007,"children":2008},{"style":727},[2009],{"type":612,"value":781},{"type":606,"tag":644,"props":2011,"children":2012},{"style":656},[2013],{"type":612,"value":786},{"type":606,"tag":644,"props":2015,"children":2016},{"style":697},[2017],{"type":612,"value":1935},{"type":606,"tag":644,"props":2019,"children":2020},{"style":656},[2021],{"type":612,"value":715},{"type":606,"tag":644,"props":2023,"children":2024},{"style":697},[2025],{"type":612,"value":883},{"type":606,"tag":644,"props":2027,"children":2028},{"style":656},[2029],{"type":612,"value":805},{"type":606,"tag":644,"props":2031,"children":2032},{"style":650},[2033],{"type":612,"value":810},{"type":606,"tag":644,"props":2035,"children":2036},{"style":813},[2037],{"type":612,"value":816},{"type":606,"tag":644,"props":2039,"children":2040},{"style":656},[2041],{"type":612,"value":821},{"type":606,"tag":644,"props":2043,"children":2044},{"class":646,"line":117},[2045,2050,2054,2058,2062],{"type":606,"tag":644,"props":2046,"children":2047},{"style":656},[2048],{"type":612,"value":2049},"    student_list ",{"type":606,"tag":644,"props":2051,"children":2052},{"style":650},[2053],{"type":612,"value":689},{"type":606,"tag":644,"props":2055,"children":2056},{"style":656},[2057],{"type":612,"value":916},{"type":606,"tag":644,"props":2059,"children":2060},{"style":813},[2061],{"type":612,"value":834},{"type":606,"tag":644,"props":2063,"children":2064},{"style":656},[2065],{"type":612,"value":839},{"type":606,"tag":644,"props":2067,"children":2068},{"class":646,"line":126},[2069,2074,2079,2084],{"type":606,"tag":644,"props":2070,"children":2071},{"style":650},[2072],{"type":612,"value":2073},"    for",{"type":606,"tag":644,"props":2075,"children":2076},{"style":656},[2077],{"type":612,"value":2078}," student ",{"type":606,"tag":644,"props":2080,"children":2081},{"style":650},[2082],{"type":612,"value":2083},"in",{"type":606,"tag":644,"props":2085,"children":2086},{"style":656},[2087],{"type":612,"value":2088}," student_list:\n",{"type":606,"tag":644,"props":2090,"children":2091},{"class":646,"line":135},[2092,2097,2101,2105,2109,2113,2118,2122,2126,2130,2134,2138,2142,2146,2150,2154,2158],{"type":606,"tag":644,"props":2093,"children":2094},{"style":727},[2095],{"type":612,"value":2096},"        print",{"type":606,"tag":644,"props":2098,"children":2099},{"style":656},[2100],{"type":612,"value":786},{"type":606,"tag":644,"props":2102,"children":2103},{"style":650},[2104],{"type":612,"value":1522},{"type":606,"tag":644,"props":2106,"children":2107},{"style":697},[2108],{"type":612,"value":1547},{"type":606,"tag":644,"props":2110,"children":2111},{"style":727},[2112],{"type":612,"value":1532},{"type":606,"tag":644,"props":2114,"children":2115},{"style":656},[2116],{"type":612,"value":2117},"student[",{"type":606,"tag":644,"props":2119,"children":2120},{"style":697},[2121],{"type":612,"value":700},{"type":606,"tag":644,"props":2123,"children":2124},{"style":656},[2125],{"type":612,"value":1640},{"type":606,"tag":644,"props":2127,"children":2128},{"style":727},[2129],{"type":612,"value":1542},{"type":606,"tag":644,"props":2131,"children":2132},{"style":697},[2133],{"type":612,"value":705},{"type":606,"tag":644,"props":2135,"children":2136},{"style":727},[2137],{"type":612,"value":1532},{"type":606,"tag":644,"props":2139,"children":2140},{"style":656},[2141],{"type":612,"value":2117},{"type":606,"tag":644,"props":2143,"children":2144},{"style":697},[2145],{"type":612,"value":1804},{"type":606,"tag":644,"props":2147,"children":2148},{"style":656},[2149],{"type":612,"value":1640},{"type":606,"tag":644,"props":2151,"children":2152},{"style":727},[2153],{"type":612,"value":1542},{"type":606,"tag":644,"props":2155,"children":2156},{"style":697},[2157],{"type":612,"value":1547},{"type":606,"tag":644,"props":2159,"children":2160},{"style":656},[2161],{"type":612,"value":839},{"type":606,"tag":939,"props":2163,"children":2165},{"id":2164},"advanced-json-handling",[2166],{"type":612,"value":2167},"🔍 Advanced JSON Handling",{"type":606,"tag":615,"props":2169,"children":2170},{},[2171],{"type":612,"value":2172},"Python allows sophisticated JSON operations and error handling.",{"type":606,"tag":1053,"props":2174,"children":2176},{"id":2175},"custom-encoders",[2177],{"type":612,"value":2178},"Custom Encoders",{"type":606,"tag":630,"props":2180,"children":2181},{},[2182],{"type":606,"tag":634,"props":2183,"children":2185},{"className":636,"code":2184,"language":638,"meta":8,"style":8},"import json\nfrom datetime import datetime\n\n# Custom JSON encoder for complex types\nclass DateTimeEncoder(json.JSONEncoder):\n    def default(self, obj):\n        if isinstance(obj, datetime):\n            return obj.isoformat()\n        return super().default(obj)\n\n# Example with datetime\ndata_with_date = {\n    'name': 'Alice',\n    'created_at': datetime.now(),\n    'scores': [85, 92, 78]\n}\n\n# Write with custom encoder\nwith open('data_with_date.json', 'w') as file:\n    json.dump(data_with_date, file, cls=DateTimeEncoder, indent=2)\n\nprint(\"JSON with custom encoder written\")\n",[2186],{"type":606,"tag":621,"props":2187,"children":2188},{"__ignoreMap":8},[2189,2200,2222,2229,2237,2274,2292,2310,2323,2341,2348,2356,2372,2391,2404,2440,2447,2454,2462,2506,2552,2559],{"type":606,"tag":644,"props":2190,"children":2191},{"class":646,"line":12},[2192,2196],{"type":606,"tag":644,"props":2193,"children":2194},{"style":650},[2195],{"type":612,"value":653},{"type":606,"tag":644,"props":2197,"children":2198},{"style":656},[2199],{"type":612,"value":659},{"type":606,"tag":644,"props":2201,"children":2202},{"class":646,"line":27},[2203,2208,2213,2217],{"type":606,"tag":644,"props":2204,"children":2205},{"style":650},[2206],{"type":612,"value":2207},"from",{"type":606,"tag":644,"props":2209,"children":2210},{"style":656},[2211],{"type":612,"value":2212}," datetime ",{"type":606,"tag":644,"props":2214,"children":2215},{"style":650},[2216],{"type":612,"value":653},{"type":606,"tag":644,"props":2218,"children":2219},{"style":656},[2220],{"type":612,"value":2221}," datetime\n",{"type":606,"tag":644,"props":2223,"children":2224},{"class":646,"line":36},[2225],{"type":606,"tag":644,"props":2226,"children":2227},{"emptyLinePlaceholder":13},[2228],{"type":612,"value":667},{"type":606,"tag":644,"props":2230,"children":2231},{"class":646,"line":45},[2232],{"type":606,"tag":644,"props":2233,"children":2234},{"style":673},[2235],{"type":612,"value":2236},"# Custom JSON encoder for complex types\n",{"type":606,"tag":644,"props":2238,"children":2239},{"class":646,"line":54},[2240,2245,2251,2255,2259,2264,2269],{"type":606,"tag":644,"props":2241,"children":2242},{"style":650},[2243],{"type":612,"value":2244},"class",{"type":606,"tag":644,"props":2246,"children":2248},{"style":2247},"--shiki-default:#6F42C1;--shiki-app-dark-mode:#B392F0",[2249],{"type":612,"value":2250}," DateTimeEncoder",{"type":606,"tag":644,"props":2252,"children":2253},{"style":656},[2254],{"type":612,"value":786},{"type":606,"tag":644,"props":2256,"children":2257},{"style":2247},[2258],{"type":612,"value":626},{"type":606,"tag":644,"props":2260,"children":2261},{"style":656},[2262],{"type":612,"value":2263},".",{"type":606,"tag":644,"props":2265,"children":2266},{"style":2247},[2267],{"type":612,"value":2268},"JSONEncoder",{"type":606,"tag":644,"props":2270,"children":2271},{"style":656},[2272],{"type":612,"value":2273},"):\n",{"type":606,"tag":644,"props":2275,"children":2276},{"class":646,"line":63},[2277,2282,2287],{"type":606,"tag":644,"props":2278,"children":2279},{"style":650},[2280],{"type":612,"value":2281},"    def",{"type":606,"tag":644,"props":2283,"children":2284},{"style":2247},[2285],{"type":612,"value":2286}," default",{"type":606,"tag":644,"props":2288,"children":2289},{"style":656},[2290],{"type":612,"value":2291},"(self, obj):\n",{"type":606,"tag":644,"props":2293,"children":2294},{"class":646,"line":72},[2295,2300,2305],{"type":606,"tag":644,"props":2296,"children":2297},{"style":650},[2298],{"type":612,"value":2299},"        if",{"type":606,"tag":644,"props":2301,"children":2302},{"style":727},[2303],{"type":612,"value":2304}," isinstance",{"type":606,"tag":644,"props":2306,"children":2307},{"style":656},[2308],{"type":612,"value":2309},"(obj, datetime):\n",{"type":606,"tag":644,"props":2311,"children":2312},{"class":646,"line":81},[2313,2318],{"type":606,"tag":644,"props":2314,"children":2315},{"style":650},[2316],{"type":612,"value":2317},"            return",{"type":606,"tag":644,"props":2319,"children":2320},{"style":656},[2321],{"type":612,"value":2322}," obj.isoformat()\n",{"type":606,"tag":644,"props":2324,"children":2325},{"class":646,"line":842},[2326,2331,2336],{"type":606,"tag":644,"props":2327,"children":2328},{"style":650},[2329],{"type":612,"value":2330},"        return",{"type":606,"tag":644,"props":2332,"children":2333},{"style":727},[2334],{"type":612,"value":2335}," super",{"type":606,"tag":644,"props":2337,"children":2338},{"style":656},[2339],{"type":612,"value":2340},"().default(obj)\n",{"type":606,"tag":644,"props":2342,"children":2343},{"class":646,"line":99},[2344],{"type":606,"tag":644,"props":2345,"children":2346},{"emptyLinePlaceholder":13},[2347],{"type":612,"value":667},{"type":606,"tag":644,"props":2349,"children":2350},{"class":646,"line":108},[2351],{"type":606,"tag":644,"props":2352,"children":2353},{"style":673},[2354],{"type":612,"value":2355},"# Example with datetime\n",{"type":606,"tag":644,"props":2357,"children":2358},{"class":646,"line":117},[2359,2364,2368],{"type":606,"tag":644,"props":2360,"children":2361},{"style":656},[2362],{"type":612,"value":2363},"data_with_date ",{"type":606,"tag":644,"props":2365,"children":2366},{"style":650},[2367],{"type":612,"value":689},{"type":606,"tag":644,"props":2369,"children":2370},{"style":656},[2371],{"type":612,"value":1110},{"type":606,"tag":644,"props":2373,"children":2374},{"class":646,"line":126},[2375,2379,2383,2387],{"type":606,"tag":644,"props":2376,"children":2377},{"style":697},[2378],{"type":612,"value":1118},{"type":606,"tag":644,"props":2380,"children":2381},{"style":656},[2382],{"type":612,"value":705},{"type":606,"tag":644,"props":2384,"children":2385},{"style":697},[2386],{"type":612,"value":710},{"type":606,"tag":644,"props":2388,"children":2389},{"style":656},[2390],{"type":612,"value":1131},{"type":606,"tag":644,"props":2392,"children":2393},{"class":646,"line":135},[2394,2399],{"type":606,"tag":644,"props":2395,"children":2396},{"style":697},[2397],{"type":612,"value":2398},"    'created_at'",{"type":606,"tag":644,"props":2400,"children":2401},{"style":656},[2402],{"type":612,"value":2403},": datetime.now(),\n",{"type":606,"tag":644,"props":2405,"children":2406},{"class":646,"line":144},[2407,2412,2416,2420,2424,2428,2432,2436],{"type":606,"tag":644,"props":2408,"children":2409},{"style":697},[2410],{"type":612,"value":2411},"    'scores'",{"type":606,"tag":644,"props":2413,"children":2414},{"style":656},[2415],{"type":612,"value":1164},{"type":606,"tag":644,"props":2417,"children":2418},{"style":727},[2419],{"type":612,"value":1169},{"type":606,"tag":644,"props":2421,"children":2422},{"style":656},[2423],{"type":612,"value":715},{"type":606,"tag":644,"props":2425,"children":2426},{"style":727},[2427],{"type":612,"value":1178},{"type":606,"tag":644,"props":2429,"children":2430},{"style":656},[2431],{"type":612,"value":715},{"type":606,"tag":644,"props":2433,"children":2434},{"style":727},[2435],{"type":612,"value":1187},{"type":606,"tag":644,"props":2437,"children":2438},{"style":656},[2439],{"type":612,"value":1908},{"type":606,"tag":644,"props":2441,"children":2442},{"class":646,"line":153},[2443],{"type":606,"tag":644,"props":2444,"children":2445},{"style":656},[2446],{"type":612,"value":753},{"type":606,"tag":644,"props":2448,"children":2449},{"class":646,"line":163},[2450],{"type":606,"tag":644,"props":2451,"children":2452},{"emptyLinePlaceholder":13},[2453],{"type":612,"value":667},{"type":606,"tag":644,"props":2455,"children":2456},{"class":646,"line":172},[2457],{"type":606,"tag":644,"props":2458,"children":2459},{"style":673},[2460],{"type":612,"value":2461},"# Write with custom encoder\n",{"type":606,"tag":644,"props":2463,"children":2464},{"class":646,"line":181},[2465,2469,2473,2477,2482,2486,2490,2494,2498,2502],{"type":606,"tag":644,"props":2466,"children":2467},{"style":650},[2468],{"type":612,"value":776},{"type":606,"tag":644,"props":2470,"children":2471},{"style":727},[2472],{"type":612,"value":781},{"type":606,"tag":644,"props":2474,"children":2475},{"style":656},[2476],{"type":612,"value":786},{"type":606,"tag":644,"props":2478,"children":2479},{"style":697},[2480],{"type":612,"value":2481},"'data_with_date.json'",{"type":606,"tag":644,"props":2483,"children":2484},{"style":656},[2485],{"type":612,"value":715},{"type":606,"tag":644,"props":2487,"children":2488},{"style":697},[2489],{"type":612,"value":800},{"type":606,"tag":644,"props":2491,"children":2492},{"style":656},[2493],{"type":612,"value":805},{"type":606,"tag":644,"props":2495,"children":2496},{"style":650},[2497],{"type":612,"value":810},{"type":606,"tag":644,"props":2499,"children":2500},{"style":813},[2501],{"type":612,"value":816},{"type":606,"tag":644,"props":2503,"children":2504},{"style":656},[2505],{"type":612,"value":821},{"type":606,"tag":644,"props":2507,"children":2508},{"class":646,"line":190},[2509,2514,2518,2522,2527,2531,2536,2540,2544,2548],{"type":606,"tag":644,"props":2510,"children":2511},{"style":656},[2512],{"type":612,"value":2513},"    json.dump(data_with_date, ",{"type":606,"tag":644,"props":2515,"children":2516},{"style":813},[2517],{"type":612,"value":834},{"type":606,"tag":644,"props":2519,"children":2520},{"style":656},[2521],{"type":612,"value":715},{"type":606,"tag":644,"props":2523,"children":2524},{"style":813},[2525],{"type":612,"value":2526},"cls",{"type":606,"tag":644,"props":2528,"children":2529},{"style":650},[2530],{"type":612,"value":689},{"type":606,"tag":644,"props":2532,"children":2533},{"style":656},[2534],{"type":612,"value":2535},"DateTimeEncoder, ",{"type":606,"tag":644,"props":2537,"children":2538},{"style":813},[2539],{"type":612,"value":1358},{"type":606,"tag":644,"props":2541,"children":2542},{"style":650},[2543],{"type":612,"value":689},{"type":606,"tag":644,"props":2545,"children":2546},{"style":727},[2547],{"type":612,"value":1596},{"type":606,"tag":644,"props":2549,"children":2550},{"style":656},[2551],{"type":612,"value":839},{"type":606,"tag":644,"props":2553,"children":2554},{"class":646,"line":199},[2555],{"type":606,"tag":644,"props":2556,"children":2557},{"emptyLinePlaceholder":13},[2558],{"type":612,"value":667},{"type":606,"tag":644,"props":2560,"children":2561},{"class":646,"line":208},[2562,2566,2570,2575],{"type":606,"tag":644,"props":2563,"children":2564},{"style":727},[2565],{"type":612,"value":1403},{"type":606,"tag":644,"props":2567,"children":2568},{"style":656},[2569],{"type":612,"value":786},{"type":606,"tag":644,"props":2571,"children":2572},{"style":697},[2573],{"type":612,"value":2574},"\"JSON with custom encoder written\"",{"type":606,"tag":644,"props":2576,"children":2577},{"style":656},[2578],{"type":612,"value":839},{"type":606,"tag":1053,"props":2580,"children":2582},{"id":2581},"safe-operations",[2583],{"type":612,"value":2584},"Safe Operations",{"type":606,"tag":630,"props":2586,"children":2587},{},[2588],{"type":606,"tag":634,"props":2589,"children":2591},{"className":636,"code":2590,"language":638,"meta":8,"style":8},"from pathlib import Path\n\n# Safe JSON operations with error handling\ndef safe_json_read(filename):\n    \"\"\"Safely read JSON file with error handling\"\"\"\n    try:\n        with open(filename, 'r') as file:\n            return json.load(file)\n    except FileNotFoundError:\n        print(f\"File {filename} not found\")\n        return None\n    except json.JSONDecodeError as e:\n        print(f\"Invalid JSON in {filename}: {e}\")\n        return None\n    except Exception as e:\n        print(f\"Error reading {filename}: {e}\")\n        return None\n\ndef safe_json_write(data, filename):\n    \"\"\"Safely write JSON file with error handling\"\"\"\n    try:\n        # Create directory if it doesn't exist\n        Path(filename).parent.mkdir(parents=True, exist_ok=True)\n        \n        with open(filename, 'w') as file:\n            json.dump(data, file, indent=2, ensure_ascii=False)\n        return True\n    except Exception as e:\n        print(f\"Error writing {filename}: {e}\")\n        return False\n\n# Example usage\nconfig_data = safe_json_read('config.json')\nif config_data:\n    print(f\"Config loaded: {config_data}\")\n",[2592],{"type":606,"tag":621,"props":2593,"children":2594},{"__ignoreMap":8},[2595,2616,2623,2631,2649,2657,2669,2706,2725,2742,2784,2796,2817,2874,2885,2906,2962,2973,2980,2997,3005,3016,3024,3066,3074,3109,3159,3171,3190,3246,3258,3265,3273,3299,3312],{"type":606,"tag":644,"props":2596,"children":2597},{"class":646,"line":12},[2598,2602,2607,2611],{"type":606,"tag":644,"props":2599,"children":2600},{"style":650},[2601],{"type":612,"value":2207},{"type":606,"tag":644,"props":2603,"children":2604},{"style":656},[2605],{"type":612,"value":2606}," pathlib ",{"type":606,"tag":644,"props":2608,"children":2609},{"style":650},[2610],{"type":612,"value":653},{"type":606,"tag":644,"props":2612,"children":2613},{"style":656},[2614],{"type":612,"value":2615}," Path\n",{"type":606,"tag":644,"props":2617,"children":2618},{"class":646,"line":27},[2619],{"type":606,"tag":644,"props":2620,"children":2621},{"emptyLinePlaceholder":13},[2622],{"type":612,"value":667},{"type":606,"tag":644,"props":2624,"children":2625},{"class":646,"line":36},[2626],{"type":606,"tag":644,"props":2627,"children":2628},{"style":673},[2629],{"type":612,"value":2630},"# Safe JSON operations with error handling\n",{"type":606,"tag":644,"props":2632,"children":2633},{"class":646,"line":45},[2634,2639,2644],{"type":606,"tag":644,"props":2635,"children":2636},{"style":650},[2637],{"type":612,"value":2638},"def",{"type":606,"tag":644,"props":2640,"children":2641},{"style":2247},[2642],{"type":612,"value":2643}," safe_json_read",{"type":606,"tag":644,"props":2645,"children":2646},{"style":656},[2647],{"type":612,"value":2648},"(filename):\n",{"type":606,"tag":644,"props":2650,"children":2651},{"class":646,"line":54},[2652],{"type":606,"tag":644,"props":2653,"children":2654},{"style":697},[2655],{"type":612,"value":2656},"    \"\"\"Safely read JSON file with error handling\"\"\"\n",{"type":606,"tag":644,"props":2658,"children":2659},{"class":646,"line":63},[2660,2665],{"type":606,"tag":644,"props":2661,"children":2662},{"style":650},[2663],{"type":612,"value":2664},"    try",{"type":606,"tag":644,"props":2666,"children":2667},{"style":656},[2668],{"type":612,"value":821},{"type":606,"tag":644,"props":2670,"children":2671},{"class":646,"line":72},[2672,2677,2681,2686,2690,2694,2698,2702],{"type":606,"tag":644,"props":2673,"children":2674},{"style":650},[2675],{"type":612,"value":2676},"        with",{"type":606,"tag":644,"props":2678,"children":2679},{"style":727},[2680],{"type":612,"value":781},{"type":606,"tag":644,"props":2682,"children":2683},{"style":656},[2684],{"type":612,"value":2685},"(filename, ",{"type":606,"tag":644,"props":2687,"children":2688},{"style":697},[2689],{"type":612,"value":883},{"type":606,"tag":644,"props":2691,"children":2692},{"style":656},[2693],{"type":612,"value":805},{"type":606,"tag":644,"props":2695,"children":2696},{"style":650},[2697],{"type":612,"value":810},{"type":606,"tag":644,"props":2699,"children":2700},{"style":813},[2701],{"type":612,"value":816},{"type":606,"tag":644,"props":2703,"children":2704},{"style":656},[2705],{"type":612,"value":821},{"type":606,"tag":644,"props":2707,"children":2708},{"class":646,"line":81},[2709,2713,2717,2721],{"type":606,"tag":644,"props":2710,"children":2711},{"style":650},[2712],{"type":612,"value":2317},{"type":606,"tag":644,"props":2714,"children":2715},{"style":656},[2716],{"type":612,"value":916},{"type":606,"tag":644,"props":2718,"children":2719},{"style":813},[2720],{"type":612,"value":834},{"type":606,"tag":644,"props":2722,"children":2723},{"style":656},[2724],{"type":612,"value":839},{"type":606,"tag":644,"props":2726,"children":2727},{"class":646,"line":842},[2728,2733,2738],{"type":606,"tag":644,"props":2729,"children":2730},{"style":650},[2731],{"type":612,"value":2732},"    except",{"type":606,"tag":644,"props":2734,"children":2735},{"style":727},[2736],{"type":612,"value":2737}," FileNotFoundError",{"type":606,"tag":644,"props":2739,"children":2740},{"style":656},[2741],{"type":612,"value":821},{"type":606,"tag":644,"props":2743,"children":2744},{"class":646,"line":99},[2745,2749,2753,2757,2762,2766,2771,2775,2780],{"type":606,"tag":644,"props":2746,"children":2747},{"style":727},[2748],{"type":612,"value":2096},{"type":606,"tag":644,"props":2750,"children":2751},{"style":656},[2752],{"type":612,"value":786},{"type":606,"tag":644,"props":2754,"children":2755},{"style":650},[2756],{"type":612,"value":1522},{"type":606,"tag":644,"props":2758,"children":2759},{"style":697},[2760],{"type":612,"value":2761},"\"File ",{"type":606,"tag":644,"props":2763,"children":2764},{"style":727},[2765],{"type":612,"value":1532},{"type":606,"tag":644,"props":2767,"children":2768},{"style":656},[2769],{"type":612,"value":2770},"filename",{"type":606,"tag":644,"props":2772,"children":2773},{"style":727},[2774],{"type":612,"value":1542},{"type":606,"tag":644,"props":2776,"children":2777},{"style":697},[2778],{"type":612,"value":2779}," not found\"",{"type":606,"tag":644,"props":2781,"children":2782},{"style":656},[2783],{"type":612,"value":839},{"type":606,"tag":644,"props":2785,"children":2786},{"class":646,"line":108},[2787,2791],{"type":606,"tag":644,"props":2788,"children":2789},{"style":650},[2790],{"type":612,"value":2330},{"type":606,"tag":644,"props":2792,"children":2793},{"style":727},[2794],{"type":612,"value":2795}," None\n",{"type":606,"tag":644,"props":2797,"children":2798},{"class":646,"line":117},[2799,2803,2808,2812],{"type":606,"tag":644,"props":2800,"children":2801},{"style":650},[2802],{"type":612,"value":2732},{"type":606,"tag":644,"props":2804,"children":2805},{"style":656},[2806],{"type":612,"value":2807}," json.JSONDecodeError ",{"type":606,"tag":644,"props":2809,"children":2810},{"style":650},[2811],{"type":612,"value":810},{"type":606,"tag":644,"props":2813,"children":2814},{"style":656},[2815],{"type":612,"value":2816}," e:\n",{"type":606,"tag":644,"props":2818,"children":2819},{"class":646,"line":126},[2820,2824,2828,2832,2837,2841,2845,2849,2853,2857,2862,2866,2870],{"type":606,"tag":644,"props":2821,"children":2822},{"style":727},[2823],{"type":612,"value":2096},{"type":606,"tag":644,"props":2825,"children":2826},{"style":656},[2827],{"type":612,"value":786},{"type":606,"tag":644,"props":2829,"children":2830},{"style":650},[2831],{"type":612,"value":1522},{"type":606,"tag":644,"props":2833,"children":2834},{"style":697},[2835],{"type":612,"value":2836},"\"Invalid JSON in ",{"type":606,"tag":644,"props":2838,"children":2839},{"style":727},[2840],{"type":612,"value":1532},{"type":606,"tag":644,"props":2842,"children":2843},{"style":656},[2844],{"type":612,"value":2770},{"type":606,"tag":644,"props":2846,"children":2847},{"style":727},[2848],{"type":612,"value":1542},{"type":606,"tag":644,"props":2850,"children":2851},{"style":697},[2852],{"type":612,"value":705},{"type":606,"tag":644,"props":2854,"children":2855},{"style":727},[2856],{"type":612,"value":1532},{"type":606,"tag":644,"props":2858,"children":2859},{"style":656},[2860],{"type":612,"value":2861},"e",{"type":606,"tag":644,"props":2863,"children":2864},{"style":727},[2865],{"type":612,"value":1542},{"type":606,"tag":644,"props":2867,"children":2868},{"style":697},[2869],{"type":612,"value":1547},{"type":606,"tag":644,"props":2871,"children":2872},{"style":656},[2873],{"type":612,"value":839},{"type":606,"tag":644,"props":2875,"children":2876},{"class":646,"line":135},[2877,2881],{"type":606,"tag":644,"props":2878,"children":2879},{"style":650},[2880],{"type":612,"value":2330},{"type":606,"tag":644,"props":2882,"children":2883},{"style":727},[2884],{"type":612,"value":2795},{"type":606,"tag":644,"props":2886,"children":2887},{"class":646,"line":144},[2888,2892,2897,2902],{"type":606,"tag":644,"props":2889,"children":2890},{"style":650},[2891],{"type":612,"value":2732},{"type":606,"tag":644,"props":2893,"children":2894},{"style":727},[2895],{"type":612,"value":2896}," Exception",{"type":606,"tag":644,"props":2898,"children":2899},{"style":650},[2900],{"type":612,"value":2901}," as",{"type":606,"tag":644,"props":2903,"children":2904},{"style":656},[2905],{"type":612,"value":2816},{"type":606,"tag":644,"props":2907,"children":2908},{"class":646,"line":153},[2909,2913,2917,2921,2926,2930,2934,2938,2942,2946,2950,2954,2958],{"type":606,"tag":644,"props":2910,"children":2911},{"style":727},[2912],{"type":612,"value":2096},{"type":606,"tag":644,"props":2914,"children":2915},{"style":656},[2916],{"type":612,"value":786},{"type":606,"tag":644,"props":2918,"children":2919},{"style":650},[2920],{"type":612,"value":1522},{"type":606,"tag":644,"props":2922,"children":2923},{"style":697},[2924],{"type":612,"value":2925},"\"Error reading ",{"type":606,"tag":644,"props":2927,"children":2928},{"style":727},[2929],{"type":612,"value":1532},{"type":606,"tag":644,"props":2931,"children":2932},{"style":656},[2933],{"type":612,"value":2770},{"type":606,"tag":644,"props":2935,"children":2936},{"style":727},[2937],{"type":612,"value":1542},{"type":606,"tag":644,"props":2939,"children":2940},{"style":697},[2941],{"type":612,"value":705},{"type":606,"tag":644,"props":2943,"children":2944},{"style":727},[2945],{"type":612,"value":1532},{"type":606,"tag":644,"props":2947,"children":2948},{"style":656},[2949],{"type":612,"value":2861},{"type":606,"tag":644,"props":2951,"children":2952},{"style":727},[2953],{"type":612,"value":1542},{"type":606,"tag":644,"props":2955,"children":2956},{"style":697},[2957],{"type":612,"value":1547},{"type":606,"tag":644,"props":2959,"children":2960},{"style":656},[2961],{"type":612,"value":839},{"type":606,"tag":644,"props":2963,"children":2964},{"class":646,"line":163},[2965,2969],{"type":606,"tag":644,"props":2966,"children":2967},{"style":650},[2968],{"type":612,"value":2330},{"type":606,"tag":644,"props":2970,"children":2971},{"style":727},[2972],{"type":612,"value":2795},{"type":606,"tag":644,"props":2974,"children":2975},{"class":646,"line":172},[2976],{"type":606,"tag":644,"props":2977,"children":2978},{"emptyLinePlaceholder":13},[2979],{"type":612,"value":667},{"type":606,"tag":644,"props":2981,"children":2982},{"class":646,"line":181},[2983,2987,2992],{"type":606,"tag":644,"props":2984,"children":2985},{"style":650},[2986],{"type":612,"value":2638},{"type":606,"tag":644,"props":2988,"children":2989},{"style":2247},[2990],{"type":612,"value":2991}," safe_json_write",{"type":606,"tag":644,"props":2993,"children":2994},{"style":656},[2995],{"type":612,"value":2996},"(data, filename):\n",{"type":606,"tag":644,"props":2998,"children":2999},{"class":646,"line":190},[3000],{"type":606,"tag":644,"props":3001,"children":3002},{"style":697},[3003],{"type":612,"value":3004},"    \"\"\"Safely write JSON file with error handling\"\"\"\n",{"type":606,"tag":644,"props":3006,"children":3007},{"class":646,"line":199},[3008,3012],{"type":606,"tag":644,"props":3009,"children":3010},{"style":650},[3011],{"type":612,"value":2664},{"type":606,"tag":644,"props":3013,"children":3014},{"style":656},[3015],{"type":612,"value":821},{"type":606,"tag":644,"props":3017,"children":3018},{"class":646,"line":208},[3019],{"type":606,"tag":644,"props":3020,"children":3021},{"style":673},[3022],{"type":612,"value":3023},"        # Create directory if it doesn't exist\n",{"type":606,"tag":644,"props":3025,"children":3026},{"class":646,"line":217},[3027,3032,3037,3041,3045,3049,3054,3058,3062],{"type":606,"tag":644,"props":3028,"children":3029},{"style":656},[3030],{"type":612,"value":3031},"        Path(filename).parent.mkdir(",{"type":606,"tag":644,"props":3033,"children":3034},{"style":813},[3035],{"type":612,"value":3036},"parents",{"type":606,"tag":644,"props":3038,"children":3039},{"style":650},[3040],{"type":612,"value":689},{"type":606,"tag":644,"props":3042,"children":3043},{"style":727},[3044],{"type":612,"value":1209},{"type":606,"tag":644,"props":3046,"children":3047},{"style":656},[3048],{"type":612,"value":715},{"type":606,"tag":644,"props":3050,"children":3051},{"style":813},[3052],{"type":612,"value":3053},"exist_ok",{"type":606,"tag":644,"props":3055,"children":3056},{"style":650},[3057],{"type":612,"value":689},{"type":606,"tag":644,"props":3059,"children":3060},{"style":727},[3061],{"type":612,"value":1209},{"type":606,"tag":644,"props":3063,"children":3064},{"style":656},[3065],{"type":612,"value":839},{"type":606,"tag":644,"props":3067,"children":3068},{"class":646,"line":227},[3069],{"type":606,"tag":644,"props":3070,"children":3071},{"style":656},[3072],{"type":612,"value":3073},"        \n",{"type":606,"tag":644,"props":3075,"children":3076},{"class":646,"line":236},[3077,3081,3085,3089,3093,3097,3101,3105],{"type":606,"tag":644,"props":3078,"children":3079},{"style":650},[3080],{"type":612,"value":2676},{"type":606,"tag":644,"props":3082,"children":3083},{"style":727},[3084],{"type":612,"value":781},{"type":606,"tag":644,"props":3086,"children":3087},{"style":656},[3088],{"type":612,"value":2685},{"type":606,"tag":644,"props":3090,"children":3091},{"style":697},[3092],{"type":612,"value":800},{"type":606,"tag":644,"props":3094,"children":3095},{"style":656},[3096],{"type":612,"value":805},{"type":606,"tag":644,"props":3098,"children":3099},{"style":650},[3100],{"type":612,"value":810},{"type":606,"tag":644,"props":3102,"children":3103},{"style":813},[3104],{"type":612,"value":816},{"type":606,"tag":644,"props":3106,"children":3107},{"style":656},[3108],{"type":612,"value":821},{"type":606,"tag":644,"props":3110,"children":3111},{"class":646,"line":245},[3112,3117,3121,3125,3129,3133,3137,3141,3146,3150,3155],{"type":606,"tag":644,"props":3113,"children":3114},{"style":656},[3115],{"type":612,"value":3116},"            json.dump(data, ",{"type":606,"tag":644,"props":3118,"children":3119},{"style":813},[3120],{"type":612,"value":834},{"type":606,"tag":644,"props":3122,"children":3123},{"style":656},[3124],{"type":612,"value":715},{"type":606,"tag":644,"props":3126,"children":3127},{"style":813},[3128],{"type":612,"value":1358},{"type":606,"tag":644,"props":3130,"children":3131},{"style":650},[3132],{"type":612,"value":689},{"type":606,"tag":644,"props":3134,"children":3135},{"style":727},[3136],{"type":612,"value":1596},{"type":606,"tag":644,"props":3138,"children":3139},{"style":656},[3140],{"type":612,"value":715},{"type":606,"tag":644,"props":3142,"children":3143},{"style":813},[3144],{"type":612,"value":3145},"ensure_ascii",{"type":606,"tag":644,"props":3147,"children":3148},{"style":650},[3149],{"type":612,"value":689},{"type":606,"tag":644,"props":3151,"children":3152},{"style":727},[3153],{"type":612,"value":3154},"False",{"type":606,"tag":644,"props":3156,"children":3157},{"style":656},[3158],{"type":612,"value":839},{"type":606,"tag":644,"props":3160,"children":3161},{"class":646,"line":254},[3162,3166],{"type":606,"tag":644,"props":3163,"children":3164},{"style":650},[3165],{"type":612,"value":2330},{"type":606,"tag":644,"props":3167,"children":3168},{"style":727},[3169],{"type":612,"value":3170}," True\n",{"type":606,"tag":644,"props":3172,"children":3173},{"class":646,"line":263},[3174,3178,3182,3186],{"type":606,"tag":644,"props":3175,"children":3176},{"style":650},[3177],{"type":612,"value":2732},{"type":606,"tag":644,"props":3179,"children":3180},{"style":727},[3181],{"type":612,"value":2896},{"type":606,"tag":644,"props":3183,"children":3184},{"style":650},[3185],{"type":612,"value":2901},{"type":606,"tag":644,"props":3187,"children":3188},{"style":656},[3189],{"type":612,"value":2816},{"type":606,"tag":644,"props":3191,"children":3192},{"class":646,"line":272},[3193,3197,3201,3205,3210,3214,3218,3222,3226,3230,3234,3238,3242],{"type":606,"tag":644,"props":3194,"children":3195},{"style":727},[3196],{"type":612,"value":2096},{"type":606,"tag":644,"props":3198,"children":3199},{"style":656},[3200],{"type":612,"value":786},{"type":606,"tag":644,"props":3202,"children":3203},{"style":650},[3204],{"type":612,"value":1522},{"type":606,"tag":644,"props":3206,"children":3207},{"style":697},[3208],{"type":612,"value":3209},"\"Error writing ",{"type":606,"tag":644,"props":3211,"children":3212},{"style":727},[3213],{"type":612,"value":1532},{"type":606,"tag":644,"props":3215,"children":3216},{"style":656},[3217],{"type":612,"value":2770},{"type":606,"tag":644,"props":3219,"children":3220},{"style":727},[3221],{"type":612,"value":1542},{"type":606,"tag":644,"props":3223,"children":3224},{"style":697},[3225],{"type":612,"value":705},{"type":606,"tag":644,"props":3227,"children":3228},{"style":727},[3229],{"type":612,"value":1532},{"type":606,"tag":644,"props":3231,"children":3232},{"style":656},[3233],{"type":612,"value":2861},{"type":606,"tag":644,"props":3235,"children":3236},{"style":727},[3237],{"type":612,"value":1542},{"type":606,"tag":644,"props":3239,"children":3240},{"style":697},[3241],{"type":612,"value":1547},{"type":606,"tag":644,"props":3243,"children":3244},{"style":656},[3245],{"type":612,"value":839},{"type":606,"tag":644,"props":3247,"children":3248},{"class":646,"line":281},[3249,3253],{"type":606,"tag":644,"props":3250,"children":3251},{"style":650},[3252],{"type":612,"value":2330},{"type":606,"tag":644,"props":3254,"children":3255},{"style":727},[3256],{"type":612,"value":3257}," False\n",{"type":606,"tag":644,"props":3259,"children":3260},{"class":646,"line":291},[3261],{"type":606,"tag":644,"props":3262,"children":3263},{"emptyLinePlaceholder":13},[3264],{"type":612,"value":667},{"type":606,"tag":644,"props":3266,"children":3267},{"class":646,"line":302},[3268],{"type":606,"tag":644,"props":3269,"children":3270},{"style":673},[3271],{"type":612,"value":3272},"# Example usage\n",{"type":606,"tag":644,"props":3274,"children":3275},{"class":646,"line":311},[3276,3281,3285,3290,3295],{"type":606,"tag":644,"props":3277,"children":3278},{"style":656},[3279],{"type":612,"value":3280},"config_data ",{"type":606,"tag":644,"props":3282,"children":3283},{"style":650},[3284],{"type":612,"value":689},{"type":606,"tag":644,"props":3286,"children":3287},{"style":656},[3288],{"type":612,"value":3289}," safe_json_read(",{"type":606,"tag":644,"props":3291,"children":3292},{"style":697},[3293],{"type":612,"value":3294},"'config.json'",{"type":606,"tag":644,"props":3296,"children":3297},{"style":656},[3298],{"type":612,"value":839},{"type":606,"tag":644,"props":3300,"children":3301},{"class":646,"line":320},[3302,3307],{"type":606,"tag":644,"props":3303,"children":3304},{"style":650},[3305],{"type":612,"value":3306},"if",{"type":606,"tag":644,"props":3308,"children":3309},{"style":656},[3310],{"type":612,"value":3311}," config_data:\n",{"type":606,"tag":644,"props":3313,"children":3314},{"class":646,"line":329},[3315,3319,3323,3327,3332,3336,3341,3345,3349],{"type":606,"tag":644,"props":3316,"children":3317},{"style":727},[3318],{"type":612,"value":932},{"type":606,"tag":644,"props":3320,"children":3321},{"style":656},[3322],{"type":612,"value":786},{"type":606,"tag":644,"props":3324,"children":3325},{"style":650},[3326],{"type":612,"value":1522},{"type":606,"tag":644,"props":3328,"children":3329},{"style":697},[3330],{"type":612,"value":3331},"\"Config loaded: ",{"type":606,"tag":644,"props":3333,"children":3334},{"style":727},[3335],{"type":612,"value":1532},{"type":606,"tag":644,"props":3337,"children":3338},{"style":656},[3339],{"type":612,"value":3340},"config_data",{"type":606,"tag":644,"props":3342,"children":3343},{"style":727},[3344],{"type":612,"value":1542},{"type":606,"tag":644,"props":3346,"children":3347},{"style":697},[3348],{"type":612,"value":1547},{"type":606,"tag":644,"props":3350,"children":3351},{"style":656},[3352],{"type":612,"value":839},{"type":606,"tag":1053,"props":3354,"children":3356},{"id":3355},"nested-data-and-validation",[3357],{"type":612,"value":3358},"Nested Data and Validation",{"type":606,"tag":630,"props":3360,"children":3361},{},[3362],{"type":606,"tag":634,"props":3363,"children":3365},{"className":636,"code":3364,"language":638,"meta":8,"style":8},"# Working with nested JSON\nnested_data = {\n    'users': [\n        {\n            'id': 1,\n            'name': 'Alice',\n            'profile': {\n                'email': 'alice@example.com',\n                'preferences': {\n                    'theme': 'dark',\n                    'notifications': True\n                }\n            }\n        }\n    ]\n}\n\nsafe_json_write(nested_data, 'nested_data.json')\n\n# JSON validation\ndef validate_json_structure(data, required_fields):\n    \"\"\"Validate JSON data has required fields\"\"\"\n    if not isinstance(data, dict):\n        return False, \"Data must be a dictionary\"\n    \n    missing_fields = []\n    for field in required_fields:\n        if field not in data:\n            missing_fields.append(field)\n    \n    if missing_fields:\n        return False, f\"Missing fields: {missing_fields}\"\n    \n    return True, \"Valid\"\n\n# Example validation\nuser_data = {'name': 'Alice', 'email': 'alice@example.com'}\nis_valid, message = validate_json_structure(user_data, ['name', 'email', 'age'])\nprint(f\"Validation: {message}\")\n",[3366],{"type":606,"tag":621,"props":3367,"children":3368},{"__ignoreMap":8},[3369,3377,3393,3406,3414,3435,3455,3467,3488,3500,3521,3538,3546,3554,3562,3570,3577,3584,3601,3608,3616,3633,3641,3672,3693,3701,3718,3739,3765,3773,3780,3792,3834,3841,3863,3870,3878,3927,3969],{"type":606,"tag":644,"props":3370,"children":3371},{"class":646,"line":12},[3372],{"type":606,"tag":644,"props":3373,"children":3374},{"style":673},[3375],{"type":612,"value":3376},"# Working with nested JSON\n",{"type":606,"tag":644,"props":3378,"children":3379},{"class":646,"line":27},[3380,3385,3389],{"type":606,"tag":644,"props":3381,"children":3382},{"style":656},[3383],{"type":612,"value":3384},"nested_data ",{"type":606,"tag":644,"props":3386,"children":3387},{"style":650},[3388],{"type":612,"value":689},{"type":606,"tag":644,"props":3390,"children":3391},{"style":656},[3392],{"type":612,"value":1110},{"type":606,"tag":644,"props":3394,"children":3395},{"class":646,"line":36},[3396,3401],{"type":606,"tag":644,"props":3397,"children":3398},{"style":697},[3399],{"type":612,"value":3400},"    'users'",{"type":606,"tag":644,"props":3402,"children":3403},{"style":656},[3404],{"type":612,"value":3405},": [\n",{"type":606,"tag":644,"props":3407,"children":3408},{"class":646,"line":45},[3409],{"type":606,"tag":644,"props":3410,"children":3411},{"style":656},[3412],{"type":612,"value":3413},"        {\n",{"type":606,"tag":644,"props":3415,"children":3416},{"class":646,"line":54},[3417,3422,3426,3431],{"type":606,"tag":644,"props":3418,"children":3419},{"style":697},[3420],{"type":612,"value":3421},"            'id'",{"type":606,"tag":644,"props":3423,"children":3424},{"style":656},[3425],{"type":612,"value":705},{"type":606,"tag":644,"props":3427,"children":3428},{"style":727},[3429],{"type":612,"value":3430},"1",{"type":606,"tag":644,"props":3432,"children":3433},{"style":656},[3434],{"type":612,"value":1131},{"type":606,"tag":644,"props":3436,"children":3437},{"class":646,"line":63},[3438,3443,3447,3451],{"type":606,"tag":644,"props":3439,"children":3440},{"style":697},[3441],{"type":612,"value":3442},"            'name'",{"type":606,"tag":644,"props":3444,"children":3445},{"style":656},[3446],{"type":612,"value":705},{"type":606,"tag":644,"props":3448,"children":3449},{"style":697},[3450],{"type":612,"value":710},{"type":606,"tag":644,"props":3452,"children":3453},{"style":656},[3454],{"type":612,"value":1131},{"type":606,"tag":644,"props":3456,"children":3457},{"class":646,"line":72},[3458,3463],{"type":606,"tag":644,"props":3459,"children":3460},{"style":697},[3461],{"type":612,"value":3462},"            'profile'",{"type":606,"tag":644,"props":3464,"children":3465},{"style":656},[3466],{"type":612,"value":1226},{"type":606,"tag":644,"props":3468,"children":3469},{"class":646,"line":81},[3470,3475,3479,3484],{"type":606,"tag":644,"props":3471,"children":3472},{"style":697},[3473],{"type":612,"value":3474},"                'email'",{"type":606,"tag":644,"props":3476,"children":3477},{"style":656},[3478],{"type":612,"value":705},{"type":606,"tag":644,"props":3480,"children":3481},{"style":697},[3482],{"type":612,"value":3483},"'alice@example.com'",{"type":606,"tag":644,"props":3485,"children":3486},{"style":656},[3487],{"type":612,"value":1131},{"type":606,"tag":644,"props":3489,"children":3490},{"class":646,"line":842},[3491,3496],{"type":606,"tag":644,"props":3492,"children":3493},{"style":697},[3494],{"type":612,"value":3495},"                'preferences'",{"type":606,"tag":644,"props":3497,"children":3498},{"style":656},[3499],{"type":612,"value":1226},{"type":606,"tag":644,"props":3501,"children":3502},{"class":646,"line":99},[3503,3508,3512,3517],{"type":606,"tag":644,"props":3504,"children":3505},{"style":697},[3506],{"type":612,"value":3507},"                    'theme'",{"type":606,"tag":644,"props":3509,"children":3510},{"style":656},[3511],{"type":612,"value":705},{"type":606,"tag":644,"props":3513,"children":3514},{"style":697},[3515],{"type":612,"value":3516},"'dark'",{"type":606,"tag":644,"props":3518,"children":3519},{"style":656},[3520],{"type":612,"value":1131},{"type":606,"tag":644,"props":3522,"children":3523},{"class":646,"line":108},[3524,3529,3533],{"type":606,"tag":644,"props":3525,"children":3526},{"style":697},[3527],{"type":612,"value":3528},"                    'notifications'",{"type":606,"tag":644,"props":3530,"children":3531},{"style":656},[3532],{"type":612,"value":705},{"type":606,"tag":644,"props":3534,"children":3535},{"style":727},[3536],{"type":612,"value":3537},"True\n",{"type":606,"tag":644,"props":3539,"children":3540},{"class":646,"line":117},[3541],{"type":606,"tag":644,"props":3542,"children":3543},{"style":656},[3544],{"type":612,"value":3545},"                }\n",{"type":606,"tag":644,"props":3547,"children":3548},{"class":646,"line":126},[3549],{"type":606,"tag":644,"props":3550,"children":3551},{"style":656},[3552],{"type":612,"value":3553},"            }\n",{"type":606,"tag":644,"props":3555,"children":3556},{"class":646,"line":135},[3557],{"type":606,"tag":644,"props":3558,"children":3559},{"style":656},[3560],{"type":612,"value":3561},"        }\n",{"type":606,"tag":644,"props":3563,"children":3564},{"class":646,"line":144},[3565],{"type":606,"tag":644,"props":3566,"children":3567},{"style":656},[3568],{"type":612,"value":3569},"    ]\n",{"type":606,"tag":644,"props":3571,"children":3572},{"class":646,"line":153},[3573],{"type":606,"tag":644,"props":3574,"children":3575},{"style":656},[3576],{"type":612,"value":753},{"type":606,"tag":644,"props":3578,"children":3579},{"class":646,"line":163},[3580],{"type":606,"tag":644,"props":3581,"children":3582},{"emptyLinePlaceholder":13},[3583],{"type":612,"value":667},{"type":606,"tag":644,"props":3585,"children":3586},{"class":646,"line":172},[3587,3592,3597],{"type":606,"tag":644,"props":3588,"children":3589},{"style":656},[3590],{"type":612,"value":3591},"safe_json_write(nested_data, ",{"type":606,"tag":644,"props":3593,"children":3594},{"style":697},[3595],{"type":612,"value":3596},"'nested_data.json'",{"type":606,"tag":644,"props":3598,"children":3599},{"style":656},[3600],{"type":612,"value":839},{"type":606,"tag":644,"props":3602,"children":3603},{"class":646,"line":181},[3604],{"type":606,"tag":644,"props":3605,"children":3606},{"emptyLinePlaceholder":13},[3607],{"type":612,"value":667},{"type":606,"tag":644,"props":3609,"children":3610},{"class":646,"line":190},[3611],{"type":606,"tag":644,"props":3612,"children":3613},{"style":673},[3614],{"type":612,"value":3615},"# JSON validation\n",{"type":606,"tag":644,"props":3617,"children":3618},{"class":646,"line":199},[3619,3623,3628],{"type":606,"tag":644,"props":3620,"children":3621},{"style":650},[3622],{"type":612,"value":2638},{"type":606,"tag":644,"props":3624,"children":3625},{"style":2247},[3626],{"type":612,"value":3627}," validate_json_structure",{"type":606,"tag":644,"props":3629,"children":3630},{"style":656},[3631],{"type":612,"value":3632},"(data, required_fields):\n",{"type":606,"tag":644,"props":3634,"children":3635},{"class":646,"line":208},[3636],{"type":606,"tag":644,"props":3637,"children":3638},{"style":697},[3639],{"type":612,"value":3640},"    \"\"\"Validate JSON data has required fields\"\"\"\n",{"type":606,"tag":644,"props":3642,"children":3643},{"class":646,"line":217},[3644,3649,3654,3658,3663,3668],{"type":606,"tag":644,"props":3645,"children":3646},{"style":650},[3647],{"type":612,"value":3648},"    if",{"type":606,"tag":644,"props":3650,"children":3651},{"style":650},[3652],{"type":612,"value":3653}," not",{"type":606,"tag":644,"props":3655,"children":3656},{"style":727},[3657],{"type":612,"value":2304},{"type":606,"tag":644,"props":3659,"children":3660},{"style":656},[3661],{"type":612,"value":3662},"(data, ",{"type":606,"tag":644,"props":3664,"children":3665},{"style":727},[3666],{"type":612,"value":3667},"dict",{"type":606,"tag":644,"props":3669,"children":3670},{"style":656},[3671],{"type":612,"value":2273},{"type":606,"tag":644,"props":3673,"children":3674},{"class":646,"line":227},[3675,3679,3684,3688],{"type":606,"tag":644,"props":3676,"children":3677},{"style":650},[3678],{"type":612,"value":2330},{"type":606,"tag":644,"props":3680,"children":3681},{"style":727},[3682],{"type":612,"value":3683}," False",{"type":606,"tag":644,"props":3685,"children":3686},{"style":656},[3687],{"type":612,"value":715},{"type":606,"tag":644,"props":3689,"children":3690},{"style":697},[3691],{"type":612,"value":3692},"\"Data must be a dictionary\"\n",{"type":606,"tag":644,"props":3694,"children":3695},{"class":646,"line":236},[3696],{"type":606,"tag":644,"props":3697,"children":3698},{"style":656},[3699],{"type":612,"value":3700},"    \n",{"type":606,"tag":644,"props":3702,"children":3703},{"class":646,"line":245},[3704,3709,3713],{"type":606,"tag":644,"props":3705,"children":3706},{"style":656},[3707],{"type":612,"value":3708},"    missing_fields ",{"type":606,"tag":644,"props":3710,"children":3711},{"style":650},[3712],{"type":612,"value":689},{"type":606,"tag":644,"props":3714,"children":3715},{"style":656},[3716],{"type":612,"value":3717}," []\n",{"type":606,"tag":644,"props":3719,"children":3720},{"class":646,"line":254},[3721,3725,3730,3734],{"type":606,"tag":644,"props":3722,"children":3723},{"style":650},[3724],{"type":612,"value":2073},{"type":606,"tag":644,"props":3726,"children":3727},{"style":656},[3728],{"type":612,"value":3729}," field ",{"type":606,"tag":644,"props":3731,"children":3732},{"style":650},[3733],{"type":612,"value":2083},{"type":606,"tag":644,"props":3735,"children":3736},{"style":656},[3737],{"type":612,"value":3738}," required_fields:\n",{"type":606,"tag":644,"props":3740,"children":3741},{"class":646,"line":263},[3742,3746,3750,3755,3760],{"type":606,"tag":644,"props":3743,"children":3744},{"style":650},[3745],{"type":612,"value":2299},{"type":606,"tag":644,"props":3747,"children":3748},{"style":656},[3749],{"type":612,"value":3729},{"type":606,"tag":644,"props":3751,"children":3752},{"style":650},[3753],{"type":612,"value":3754},"not",{"type":606,"tag":644,"props":3756,"children":3757},{"style":650},[3758],{"type":612,"value":3759}," in",{"type":606,"tag":644,"props":3761,"children":3762},{"style":656},[3763],{"type":612,"value":3764}," data:\n",{"type":606,"tag":644,"props":3766,"children":3767},{"class":646,"line":272},[3768],{"type":606,"tag":644,"props":3769,"children":3770},{"style":656},[3771],{"type":612,"value":3772},"            missing_fields.append(field)\n",{"type":606,"tag":644,"props":3774,"children":3775},{"class":646,"line":281},[3776],{"type":606,"tag":644,"props":3777,"children":3778},{"style":656},[3779],{"type":612,"value":3700},{"type":606,"tag":644,"props":3781,"children":3782},{"class":646,"line":291},[3783,3787],{"type":606,"tag":644,"props":3784,"children":3785},{"style":650},[3786],{"type":612,"value":3648},{"type":606,"tag":644,"props":3788,"children":3789},{"style":656},[3790],{"type":612,"value":3791}," missing_fields:\n",{"type":606,"tag":644,"props":3793,"children":3794},{"class":646,"line":302},[3795,3799,3803,3807,3811,3816,3820,3825,3829],{"type":606,"tag":644,"props":3796,"children":3797},{"style":650},[3798],{"type":612,"value":2330},{"type":606,"tag":644,"props":3800,"children":3801},{"style":727},[3802],{"type":612,"value":3683},{"type":606,"tag":644,"props":3804,"children":3805},{"style":656},[3806],{"type":612,"value":715},{"type":606,"tag":644,"props":3808,"children":3809},{"style":650},[3810],{"type":612,"value":1522},{"type":606,"tag":644,"props":3812,"children":3813},{"style":697},[3814],{"type":612,"value":3815},"\"Missing fields: ",{"type":606,"tag":644,"props":3817,"children":3818},{"style":727},[3819],{"type":612,"value":1532},{"type":606,"tag":644,"props":3821,"children":3822},{"style":656},[3823],{"type":612,"value":3824},"missing_fields",{"type":606,"tag":644,"props":3826,"children":3827},{"style":727},[3828],{"type":612,"value":1542},{"type":606,"tag":644,"props":3830,"children":3831},{"style":697},[3832],{"type":612,"value":3833},"\"\n",{"type":606,"tag":644,"props":3835,"children":3836},{"class":646,"line":311},[3837],{"type":606,"tag":644,"props":3838,"children":3839},{"style":656},[3840],{"type":612,"value":3700},{"type":606,"tag":644,"props":3842,"children":3843},{"class":646,"line":320},[3844,3849,3854,3858],{"type":606,"tag":644,"props":3845,"children":3846},{"style":650},[3847],{"type":612,"value":3848},"    return",{"type":606,"tag":644,"props":3850,"children":3851},{"style":727},[3852],{"type":612,"value":3853}," True",{"type":606,"tag":644,"props":3855,"children":3856},{"style":656},[3857],{"type":612,"value":715},{"type":606,"tag":644,"props":3859,"children":3860},{"style":697},[3861],{"type":612,"value":3862},"\"Valid\"\n",{"type":606,"tag":644,"props":3864,"children":3865},{"class":646,"line":329},[3866],{"type":606,"tag":644,"props":3867,"children":3868},{"emptyLinePlaceholder":13},[3869],{"type":612,"value":667},{"type":606,"tag":644,"props":3871,"children":3872},{"class":646,"line":338},[3873],{"type":606,"tag":644,"props":3874,"children":3875},{"style":673},[3876],{"type":612,"value":3877},"# Example validation\n",{"type":606,"tag":644,"props":3879,"children":3880},{"class":646,"line":347},[3881,3886,3890,3894,3898,3902,3906,3910,3915,3919,3923],{"type":606,"tag":644,"props":3882,"children":3883},{"style":656},[3884],{"type":612,"value":3885},"user_data ",{"type":606,"tag":644,"props":3887,"children":3888},{"style":650},[3889],{"type":612,"value":689},{"type":606,"tag":644,"props":3891,"children":3892},{"style":656},[3893],{"type":612,"value":694},{"type":606,"tag":644,"props":3895,"children":3896},{"style":697},[3897],{"type":612,"value":700},{"type":606,"tag":644,"props":3899,"children":3900},{"style":656},[3901],{"type":612,"value":705},{"type":606,"tag":644,"props":3903,"children":3904},{"style":697},[3905],{"type":612,"value":710},{"type":606,"tag":644,"props":3907,"children":3908},{"style":656},[3909],{"type":612,"value":715},{"type":606,"tag":644,"props":3911,"children":3912},{"style":697},[3913],{"type":612,"value":3914},"'email'",{"type":606,"tag":644,"props":3916,"children":3917},{"style":656},[3918],{"type":612,"value":705},{"type":606,"tag":644,"props":3920,"children":3921},{"style":697},[3922],{"type":612,"value":3483},{"type":606,"tag":644,"props":3924,"children":3925},{"style":656},[3926],{"type":612,"value":753},{"type":606,"tag":644,"props":3928,"children":3929},{"class":646,"line":356},[3930,3935,3939,3944,3948,3952,3956,3960,3964],{"type":606,"tag":644,"props":3931,"children":3932},{"style":656},[3933],{"type":612,"value":3934},"is_valid, message ",{"type":606,"tag":644,"props":3936,"children":3937},{"style":650},[3938],{"type":612,"value":689},{"type":606,"tag":644,"props":3940,"children":3941},{"style":656},[3942],{"type":612,"value":3943}," validate_json_structure(user_data, [",{"type":606,"tag":644,"props":3945,"children":3946},{"style":697},[3947],{"type":612,"value":700},{"type":606,"tag":644,"props":3949,"children":3950},{"style":656},[3951],{"type":612,"value":715},{"type":606,"tag":644,"props":3953,"children":3954},{"style":697},[3955],{"type":612,"value":3914},{"type":606,"tag":644,"props":3957,"children":3958},{"style":656},[3959],{"type":612,"value":715},{"type":606,"tag":644,"props":3961,"children":3962},{"style":697},[3963],{"type":612,"value":720},{"type":606,"tag":644,"props":3965,"children":3966},{"style":656},[3967],{"type":612,"value":3968},"])\n",{"type":606,"tag":644,"props":3970,"children":3971},{"class":646,"line":367},[3972,3976,3980,3984,3989,3993,3998,4002,4006],{"type":606,"tag":644,"props":3973,"children":3974},{"style":727},[3975],{"type":612,"value":1403},{"type":606,"tag":644,"props":3977,"children":3978},{"style":656},[3979],{"type":612,"value":786},{"type":606,"tag":644,"props":3981,"children":3982},{"style":650},[3983],{"type":612,"value":1522},{"type":606,"tag":644,"props":3985,"children":3986},{"style":697},[3987],{"type":612,"value":3988},"\"Validation: ",{"type":606,"tag":644,"props":3990,"children":3991},{"style":727},[3992],{"type":612,"value":1532},{"type":606,"tag":644,"props":3994,"children":3995},{"style":656},[3996],{"type":612,"value":3997},"message",{"type":606,"tag":644,"props":3999,"children":4000},{"style":727},[4001],{"type":612,"value":1542},{"type":606,"tag":644,"props":4003,"children":4004},{"style":697},[4005],{"type":612,"value":1547},{"type":606,"tag":644,"props":4007,"children":4008},{"style":656},[4009],{"type":612,"value":839},{"type":606,"tag":1053,"props":4011,"children":4013},{"id":4012},"utility-functions",[4014],{"type":612,"value":4015},"Utility Functions",{"type":606,"tag":630,"props":4017,"children":4018},{},[4019],{"type":606,"tag":634,"props":4020,"children":4022},{"className":636,"code":4021,"language":638,"meta":8,"style":8},"# Merging JSON files\ndef merge_json_files(*filenames):\n    \"\"\"Merge multiple JSON files into one\"\"\"\n    merged_data = {}\n    \n    for filename in filenames:\n        data = safe_json_read(filename)\n        if data:\n            merged_data.update(data)\n    \n    return merged_data\n\n# Pretty print JSON\ndef pretty_print_json(data):\n    \"\"\"Pretty print JSON data\"\"\"\n    print(json.dumps(data, indent=2, sort_keys=True, ensure_ascii=False))\n\n# Example usage\npretty_print_json(nested_data)\nprint(\"JSON utility functions demonstrated\")\n",[4023],{"type":606,"tag":621,"props":4024,"children":4025},{"__ignoreMap":8},[4026,4034,4060,4068,4085,4092,4113,4130,4141,4149,4156,4168,4175,4183,4200,4208,4269,4276,4283,4291],{"type":606,"tag":644,"props":4027,"children":4028},{"class":646,"line":12},[4029],{"type":606,"tag":644,"props":4030,"children":4031},{"style":673},[4032],{"type":612,"value":4033},"# Merging JSON files\n",{"type":606,"tag":644,"props":4035,"children":4036},{"class":646,"line":27},[4037,4041,4046,4050,4055],{"type":606,"tag":644,"props":4038,"children":4039},{"style":650},[4040],{"type":612,"value":2638},{"type":606,"tag":644,"props":4042,"children":4043},{"style":2247},[4044],{"type":612,"value":4045}," merge_json_files",{"type":606,"tag":644,"props":4047,"children":4048},{"style":656},[4049],{"type":612,"value":786},{"type":606,"tag":644,"props":4051,"children":4052},{"style":650},[4053],{"type":612,"value":4054},"*",{"type":606,"tag":644,"props":4056,"children":4057},{"style":656},[4058],{"type":612,"value":4059},"filenames):\n",{"type":606,"tag":644,"props":4061,"children":4062},{"class":646,"line":36},[4063],{"type":606,"tag":644,"props":4064,"children":4065},{"style":697},[4066],{"type":612,"value":4067},"    \"\"\"Merge multiple JSON files into one\"\"\"\n",{"type":606,"tag":644,"props":4069,"children":4070},{"class":646,"line":45},[4071,4076,4080],{"type":606,"tag":644,"props":4072,"children":4073},{"style":656},[4074],{"type":612,"value":4075},"    merged_data ",{"type":606,"tag":644,"props":4077,"children":4078},{"style":650},[4079],{"type":612,"value":689},{"type":606,"tag":644,"props":4081,"children":4082},{"style":656},[4083],{"type":612,"value":4084}," {}\n",{"type":606,"tag":644,"props":4086,"children":4087},{"class":646,"line":54},[4088],{"type":606,"tag":644,"props":4089,"children":4090},{"style":656},[4091],{"type":612,"value":3700},{"type":606,"tag":644,"props":4093,"children":4094},{"class":646,"line":63},[4095,4099,4104,4108],{"type":606,"tag":644,"props":4096,"children":4097},{"style":650},[4098],{"type":612,"value":2073},{"type":606,"tag":644,"props":4100,"children":4101},{"style":656},[4102],{"type":612,"value":4103}," filename ",{"type":606,"tag":644,"props":4105,"children":4106},{"style":650},[4107],{"type":612,"value":2083},{"type":606,"tag":644,"props":4109,"children":4110},{"style":656},[4111],{"type":612,"value":4112}," filenames:\n",{"type":606,"tag":644,"props":4114,"children":4115},{"class":646,"line":72},[4116,4121,4125],{"type":606,"tag":644,"props":4117,"children":4118},{"style":656},[4119],{"type":612,"value":4120},"        data ",{"type":606,"tag":644,"props":4122,"children":4123},{"style":650},[4124],{"type":612,"value":689},{"type":606,"tag":644,"props":4126,"children":4127},{"style":656},[4128],{"type":612,"value":4129}," safe_json_read(filename)\n",{"type":606,"tag":644,"props":4131,"children":4132},{"class":646,"line":81},[4133,4137],{"type":606,"tag":644,"props":4134,"children":4135},{"style":650},[4136],{"type":612,"value":2299},{"type":606,"tag":644,"props":4138,"children":4139},{"style":656},[4140],{"type":612,"value":3764},{"type":606,"tag":644,"props":4142,"children":4143},{"class":646,"line":842},[4144],{"type":606,"tag":644,"props":4145,"children":4146},{"style":656},[4147],{"type":612,"value":4148},"            merged_data.update(data)\n",{"type":606,"tag":644,"props":4150,"children":4151},{"class":646,"line":99},[4152],{"type":606,"tag":644,"props":4153,"children":4154},{"style":656},[4155],{"type":612,"value":3700},{"type":606,"tag":644,"props":4157,"children":4158},{"class":646,"line":108},[4159,4163],{"type":606,"tag":644,"props":4160,"children":4161},{"style":650},[4162],{"type":612,"value":3848},{"type":606,"tag":644,"props":4164,"children":4165},{"style":656},[4166],{"type":612,"value":4167}," merged_data\n",{"type":606,"tag":644,"props":4169,"children":4170},{"class":646,"line":117},[4171],{"type":606,"tag":644,"props":4172,"children":4173},{"emptyLinePlaceholder":13},[4174],{"type":612,"value":667},{"type":606,"tag":644,"props":4176,"children":4177},{"class":646,"line":126},[4178],{"type":606,"tag":644,"props":4179,"children":4180},{"style":673},[4181],{"type":612,"value":4182},"# Pretty print JSON\n",{"type":606,"tag":644,"props":4184,"children":4185},{"class":646,"line":135},[4186,4190,4195],{"type":606,"tag":644,"props":4187,"children":4188},{"style":650},[4189],{"type":612,"value":2638},{"type":606,"tag":644,"props":4191,"children":4192},{"style":2247},[4193],{"type":612,"value":4194}," pretty_print_json",{"type":606,"tag":644,"props":4196,"children":4197},{"style":656},[4198],{"type":612,"value":4199},"(data):\n",{"type":606,"tag":644,"props":4201,"children":4202},{"class":646,"line":144},[4203],{"type":606,"tag":644,"props":4204,"children":4205},{"style":697},[4206],{"type":612,"value":4207},"    \"\"\"Pretty print JSON data\"\"\"\n",{"type":606,"tag":644,"props":4209,"children":4210},{"class":646,"line":153},[4211,4215,4220,4224,4228,4232,4236,4240,4244,4248,4252,4256,4260,4264],{"type":606,"tag":644,"props":4212,"children":4213},{"style":727},[4214],{"type":612,"value":932},{"type":606,"tag":644,"props":4216,"children":4217},{"style":656},[4218],{"type":612,"value":4219},"(json.dumps(data, ",{"type":606,"tag":644,"props":4221,"children":4222},{"style":813},[4223],{"type":612,"value":1358},{"type":606,"tag":644,"props":4225,"children":4226},{"style":650},[4227],{"type":612,"value":689},{"type":606,"tag":644,"props":4229,"children":4230},{"style":727},[4231],{"type":612,"value":1596},{"type":606,"tag":644,"props":4233,"children":4234},{"style":656},[4235],{"type":612,"value":715},{"type":606,"tag":644,"props":4237,"children":4238},{"style":813},[4239],{"type":612,"value":1376},{"type":606,"tag":644,"props":4241,"children":4242},{"style":650},[4243],{"type":612,"value":689},{"type":606,"tag":644,"props":4245,"children":4246},{"style":727},[4247],{"type":612,"value":1209},{"type":606,"tag":644,"props":4249,"children":4250},{"style":656},[4251],{"type":612,"value":715},{"type":606,"tag":644,"props":4253,"children":4254},{"style":813},[4255],{"type":612,"value":3145},{"type":606,"tag":644,"props":4257,"children":4258},{"style":650},[4259],{"type":612,"value":689},{"type":606,"tag":644,"props":4261,"children":4262},{"style":727},[4263],{"type":612,"value":3154},{"type":606,"tag":644,"props":4265,"children":4266},{"style":656},[4267],{"type":612,"value":4268},"))\n",{"type":606,"tag":644,"props":4270,"children":4271},{"class":646,"line":163},[4272],{"type":606,"tag":644,"props":4273,"children":4274},{"emptyLinePlaceholder":13},[4275],{"type":612,"value":667},{"type":606,"tag":644,"props":4277,"children":4278},{"class":646,"line":172},[4279],{"type":606,"tag":644,"props":4280,"children":4281},{"style":673},[4282],{"type":612,"value":3272},{"type":606,"tag":644,"props":4284,"children":4285},{"class":646,"line":181},[4286],{"type":606,"tag":644,"props":4287,"children":4288},{"style":656},[4289],{"type":612,"value":4290},"pretty_print_json(nested_data)\n",{"type":606,"tag":644,"props":4292,"children":4293},{"class":646,"line":190},[4294,4298,4302,4307],{"type":606,"tag":644,"props":4295,"children":4296},{"style":727},[4297],{"type":612,"value":1403},{"type":606,"tag":644,"props":4299,"children":4300},{"style":656},[4301],{"type":612,"value":786},{"type":606,"tag":644,"props":4303,"children":4304},{"style":697},[4305],{"type":612,"value":4306},"\"JSON utility functions demonstrated\"",{"type":606,"tag":644,"props":4308,"children":4309},{"style":656},[4310],{"type":612,"value":839},{"type":606,"tag":939,"props":4312,"children":4314},{"id":4313},"json-parameters-reference-table",[4315],{"type":612,"value":4316},"📋 JSON Parameters Reference Table",{"type":606,"tag":4318,"props":4319,"children":4320},"table",{},[4321,4345],{"type":606,"tag":4322,"props":4323,"children":4324},"thead",{},[4325],{"type":606,"tag":4326,"props":4327,"children":4328},"tr",{},[4329,4335,4340],{"type":606,"tag":4330,"props":4331,"children":4332},"th",{},[4333],{"type":612,"value":4334},"Parameter",{"type":606,"tag":4330,"props":4336,"children":4337},{},[4338],{"type":612,"value":4339},"Purpose",{"type":606,"tag":4330,"props":4341,"children":4342},{},[4343],{"type":612,"value":4344},"Values",{"type":606,"tag":4346,"props":4347,"children":4348},"tbody",{},[4349,4387,4417,4447,4480],{"type":606,"tag":4326,"props":4350,"children":4351},{},[4352,4361,4366],{"type":606,"tag":4353,"props":4354,"children":4355},"td",{},[4356],{"type":606,"tag":621,"props":4357,"children":4359},{"className":4358},[],[4360],{"type":612,"value":1358},{"type":606,"tag":4353,"props":4362,"children":4363},{},[4364],{"type":612,"value":4365},"Pretty formatting",{"type":606,"tag":4353,"props":4367,"children":4368},{},[4369,4374,4375,4380,4381],{"type":606,"tag":621,"props":4370,"children":4372},{"className":4371},[],[4373],{"type":612,"value":1596},{"type":612,"value":715},{"type":606,"tag":621,"props":4376,"children":4378},{"className":4377},[],[4379],{"type":612,"value":1367},{"type":612,"value":715},{"type":606,"tag":621,"props":4382,"children":4384},{"className":4383},[],[4385],{"type":612,"value":4386},"None",{"type":606,"tag":4326,"props":4388,"children":4389},{},[4390,4398,4403],{"type":606,"tag":4353,"props":4391,"children":4392},{},[4393],{"type":606,"tag":621,"props":4394,"children":4396},{"className":4395},[],[4397],{"type":612,"value":1376},{"type":606,"tag":4353,"props":4399,"children":4400},{},[4401],{"type":612,"value":4402},"Sort dictionary keys",{"type":606,"tag":4353,"props":4404,"children":4405},{},[4406,4411,4412],{"type":606,"tag":621,"props":4407,"children":4409},{"className":4408},[],[4410],{"type":612,"value":1209},{"type":612,"value":715},{"type":606,"tag":621,"props":4413,"children":4415},{"className":4414},[],[4416],{"type":612,"value":3154},{"type":606,"tag":4326,"props":4418,"children":4419},{},[4420,4428,4433],{"type":606,"tag":4353,"props":4421,"children":4422},{},[4423],{"type":606,"tag":621,"props":4424,"children":4426},{"className":4425},[],[4427],{"type":612,"value":3145},{"type":606,"tag":4353,"props":4429,"children":4430},{},[4431],{"type":612,"value":4432},"Use only ASCII characters",{"type":606,"tag":4353,"props":4434,"children":4435},{},[4436,4441,4442],{"type":606,"tag":621,"props":4437,"children":4439},{"className":4438},[],[4440],{"type":612,"value":1209},{"type":612,"value":715},{"type":606,"tag":621,"props":4443,"children":4445},{"className":4444},[],[4446],{"type":612,"value":3154},{"type":606,"tag":4326,"props":4448,"children":4449},{},[4450,4459,4464],{"type":606,"tag":4353,"props":4451,"children":4452},{},[4453],{"type":606,"tag":621,"props":4454,"children":4456},{"className":4455},[],[4457],{"type":612,"value":4458},"separators",{"type":606,"tag":4353,"props":4460,"children":4461},{},[4462],{"type":612,"value":4463},"Custom separators",{"type":606,"tag":4353,"props":4465,"children":4466},{},[4467,4473,4474],{"type":606,"tag":621,"props":4468,"children":4470},{"className":4469},[],[4471],{"type":612,"value":4472},"(',', ':')",{"type":612,"value":715},{"type":606,"tag":621,"props":4475,"children":4477},{"className":4476},[],[4478],{"type":612,"value":4479},"(', ', ': ')",{"type":606,"tag":4326,"props":4481,"children":4482},{},[4483,4491,4496],{"type":606,"tag":4353,"props":4484,"children":4485},{},[4486],{"type":606,"tag":621,"props":4487,"children":4489},{"className":4488},[],[4490],{"type":612,"value":2526},{"type":606,"tag":4353,"props":4492,"children":4493},{},[4494],{"type":612,"value":4495},"Custom encoder class",{"type":606,"tag":4353,"props":4497,"children":4498},{},[4499,4505],{"type":606,"tag":621,"props":4500,"children":4502},{"className":4501},[],[4503],{"type":612,"value":4504},"DateTimeEncoder",{"type":612,"value":4506},", etc.",{"type":606,"tag":939,"props":4508,"children":4510},{"id":4509},"key-takeaways",[4511],{"type":612,"value":4512},"🎯 Key Takeaways",{"type":606,"tag":951,"props":4514,"children":4518},{"emoji":4515,"title":4516,"type":4517},"📚","JSON Handling Essentials","success",[4519,4527,4582,4590,4613,4621,4644],{"type":606,"tag":615,"props":4520,"children":4521},{},[4522],{"type":606,"tag":961,"props":4523,"children":4524},{},[4525],{"type":612,"value":4526},"Basic Operations:",{"type":606,"tag":967,"props":4528,"children":4529},{},[4530,4549,4566,4571],{"type":606,"tag":971,"props":4531,"children":4532},{},[4533,4535,4540,4542,4547],{"type":612,"value":4534},"Use ",{"type":606,"tag":621,"props":4536,"children":4538},{"className":4537},[],[4539],{"type":612,"value":979},{"type":612,"value":4541}," and ",{"type":606,"tag":621,"props":4543,"children":4545},{"className":4544},[],[4546],{"type":612,"value":990},{"type":612,"value":4548}," for files",{"type":606,"tag":971,"props":4550,"children":4551},{},[4552,4553,4558,4559,4564],{"type":612,"value":4534},{"type":606,"tag":621,"props":4554,"children":4556},{"className":4555},[],[4557],{"type":612,"value":1012},{"type":612,"value":4541},{"type":606,"tag":621,"props":4560,"children":4562},{"className":4561},[],[4563],{"type":612,"value":1023},{"type":612,"value":4565}," for strings",{"type":606,"tag":971,"props":4567,"children":4568},{},[4569],{"type":612,"value":4570},"Always handle JSON decode errors",{"type":606,"tag":971,"props":4572,"children":4573},{},[4574,4575,4580],{"type":612,"value":4534},{"type":606,"tag":621,"props":4576,"children":4578},{"className":4577},[],[4579],{"type":612,"value":1358},{"type":612,"value":4581}," for readable output",{"type":606,"tag":615,"props":4583,"children":4584},{},[4585],{"type":606,"tag":961,"props":4586,"children":4587},{},[4588],{"type":612,"value":4589},"Advanced Features:",{"type":606,"tag":967,"props":4591,"children":4592},{},[4593,4598,4603,4608],{"type":606,"tag":971,"props":4594,"children":4595},{},[4596],{"type":612,"value":4597},"Custom encoders for complex types",{"type":606,"tag":971,"props":4599,"children":4600},{},[4601],{"type":612,"value":4602},"Data validation",{"type":606,"tag":971,"props":4604,"children":4605},{},[4606],{"type":612,"value":4607},"Error handling",{"type":606,"tag":971,"props":4609,"children":4610},{},[4611],{"type":612,"value":4612},"File merging",{"type":606,"tag":615,"props":4614,"children":4615},{},[4616],{"type":606,"tag":961,"props":4617,"children":4618},{},[4619],{"type":612,"value":4620},"Best Practices:",{"type":606,"tag":967,"props":4622,"children":4623},{},[4624,4629,4634,4639],{"type":606,"tag":971,"props":4625,"children":4626},{},[4627],{"type":612,"value":4628},"Validate JSON structure",{"type":606,"tag":971,"props":4630,"children":4631},{},[4632],{"type":612,"value":4633},"Handle encoding issues",{"type":606,"tag":971,"props":4635,"children":4636},{},[4637],{"type":612,"value":4638},"Use appropriate indentation",{"type":606,"tag":971,"props":4640,"children":4641},{},[4642],{"type":612,"value":4643},"Create backups before overwriting",{"type":606,"tag":615,"props":4645,"children":4646},{},[4647,4652],{"type":606,"tag":961,"props":4648,"children":4649},{},[4650],{"type":612,"value":4651},"Remember:",{"type":612,"value":4653}," JSON only supports basic data types - use custom encoders for complex objects!",{"type":606,"tag":4655,"props":4656,"children":4657},"style",{},[4658],{"type":612,"value":4659},"html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .app-dark-mode .shiki span {color: var(--shiki-app-dark-mode);background: var(--shiki-app-dark-mode-bg);font-style: var(--shiki-app-dark-mode-font-style);font-weight: var(--shiki-app-dark-mode-font-weight);text-decoration: var(--shiki-app-dark-mode-text-decoration);}html.app-dark-mode .shiki span {color: var(--shiki-app-dark-mode);background: var(--shiki-app-dark-mode-bg);font-style: var(--shiki-app-dark-mode-font-style);font-weight: var(--shiki-app-dark-mode-font-weight);text-decoration: var(--shiki-app-dark-mode-text-decoration);}",{"title":8,"searchDepth":36,"depth":36,"links":4661},[4662,4667,4673,4674],{"id":941,"depth":27,"text":944,"children":4663},[4664,4665,4666],{"id":1055,"depth":36,"text":1058},{"id":1419,"depth":36,"text":1422},{"id":1737,"depth":36,"text":1740},{"id":2164,"depth":27,"text":2167,"children":4668},[4669,4670,4671,4672],{"id":2175,"depth":36,"text":2178},{"id":2581,"depth":36,"text":2584},{"id":3355,"depth":36,"text":3358},{"id":4012,"depth":36,"text":4015},{"id":4313,"depth":27,"text":4316},{"id":4509,"depth":27,"text":4512},1782373757035]