Notepad is quite the versatile text editor for Windows even if you ignore the program's plugin system for a moment which extends it even further. One of the features that I make use of regularly is the program's ability to search for text in all files of a folder that I specify.
- Textpad Free Download For Windows Xp Service Pack
- Textpad For Windows 10 Free
- Textpad Free Download For Windows Xp Sp3
What's New?
Textpad free download - Lumia TextPad, Khmer TextPad, Tech-Pro Utilities Collection, and many more programs. Notepad is an open source text and code editor available free to download for Windows 10/8/7/XP. Download latest version from here. Download Notepad. Improved Wipe MFT Free Space routines on Windows 10. Improved Taskbar Jump Lists cleaning on Windows 10. Improved drag and drop functionality on Windows 10. Improved free space size detection on SSD. Improved Scheduling functionality. Improved multiple monitor support. Minor GUI improvements. Minor bug fixes.
- Improved Google Chrome Cache, History, Cookies and Sessions cleaning.
- Improved Brave Cache, History, Cookies and Sessions cleaning.
- Improved Firefox Cache and Download History cleaning.
- Improved Auto-Update checking process.
- Minor GUI improvements.
- Minor bug fixes.
- Added cleaning for GitHub Desktop, Handy Backup, WhatsApp, Wondershare PDF Editor and Zend Studio.
- Improved Google Chrome Cache and History cleaning.
- Improved Wipe exFAT Free Space routine.
- Improved Solid-state drive (SSD) detection.
- Minor GUI improvements.
- Minor bug fixes.
- Improved Wipe MFT Free Space routines.
- Improved File Slack Space cleaning.
- Improved Recycle Bin cleaning.
- Improved Windows Error Reporting cleaning.
- Improved Windows Log Files cleaning.
- Minor GUI improvements.
- Minor bug fixes.
- Improved Thunderbird embedded browser cleaning.
- Improved Registry cleaning and backup support.
- Improved Windows environment variable support.
- Improved command line support.
- Improved Auto-Update checking process.
- Minor GUI improvements.
- Minor bug fixes.
- Improved Google Chrome Download History cleaning.
- Improved cleaning multiple profiles for Chromium based browsers.
- Improved detection and cleaning of portable browsers.
- Improved performance of Compact database routines.
- Improved Wipe MFT Free Space routines.
- Optimized 64-bit build architecture.
- Minor GUI improvements.
- Minor bug fixes.
- Added Firefox Startup Cache cleaning.
- Improved Firefox Saved Password cleaning.
- Improved OS type detection.
- Optimized plug-in processing engine.
- Minor GUI improvements.
- Minor bug fixes.
- Added cleaning for WinZip Registry Optimizer, Wordweb, XMind, YouTube-DL and Zoom.
- Improved Internet Explorer Cache, History and Cookies cleaning.
- Improved Microsoft Edge Cache, History and Cookies cleaning.
- Improved localization and language support.
- Minor GUI improvements.
- Minor bug fixes.
- Improved Microsoft Edge Cache, History and Cookies cleaning.
- Improved Cookie Manager for Microsoft Edge.
- Optimized 64-bit build architecture.
- Improved localization and language support.
- Minor GUI improvements.
- Minor bug fixes.
- Improved Internet Explorer Cache, History and Cookies cleaning.
- Improved Cookie Manager for Internet Explorer.
- Improved Invalid Start Menu/Desktop Shortcuts cleaning.
- Improved Drive Wiper workflow.
- Improved Skype cleaning.
- Minor GUI improvements.
- Minor bug fixes.
- Added support for Microsoft Edge (Chromium) browser.
- Added independent cleaning and monitoring for Brave browser.
- Added independent cleaning and monitoring for Vivaldi browser.
- Added automatically scan for cookies to keep functionality.
- Improved Google Chrome Download History cleaning.
- Improved Opera Download History cleaning.
- Improved File Shredder workflow.
- Improved Drive Wiper workflow.
- Minor GUI improvements.
- Minor bug fixes.
- Improved Microsoft Office cleaning.
- Improved Registry detection and backup.
- Improved File scanning performance on Solid-state drive (SSD).
- Improved Uninstaller scanning and uninstalling routines.
- Minor GUI improvements.
- Minor bug fixes.
- Improved Firefox cleaning and monitoring.
- Improved Registry cleaning for Missing Shared DLLs.
- Improved Windows Memory Dumps cleaning.
- Improved Wipe FAT/FAT32/exFAT Free Space routines.
- Minor GUI improvements.
- Minor bug fixes.
- Improved Google Chrome cleaning and monitoring.
- Improved Firefox Internet History cleaning.
- Improved Opera Cookies cleaning.
- Improved Import/Export functionality for Plug-ins.
- Improved keyboard navigation and shortcuts.
- Minor GUI improvements.
- Minor bug fixes.
- Improved Alternate Data Streams cleaning.
- Improved Solid-state drive (SSD) detection.
- Improved command line support.
- Improved Auto-Update checking process.
- Minor GUI improvements.
- Minor bug fixes.
- Improved Google Chrome History cleaning.
- Improved Taskbar Jump Lists cleaning on Windows 10.
- Improved Skip UAC warning on Windows 10.
- Improved Schedule options on Windows 10.
- Improved environment variable support for plug-in processing engine.
- Minor GUI improvements.
- Minor bug fixes.
- Improved Mozilla based browsers detection and cleaning.
- Improved File scanning performance on NTFS drives.
- Improved Drive Wiper functionality for Windows 10.
- Improved Options-Include/Exclude Registry key entry format.
- Minor GUI improvements.
- Minor bug fixes.
- Improved Firefox Cookies cleaning.
- Improved Microsoft Office cleaning.
- Improved Skip UAC warning on Windows 10.
- Improved multiple-user profiles detection and cleaning.
- Improved localization and language support.
- Minor GUI improvements.
- Minor bug fixes.
- Improved Google Chrome Cookies cleaning.
- Improved Opera Cookies cleaning.
- Improved Chromium based browsers detection and cleaning.
- Improved detection and cleaning of portable browsers.
- Improved Auto-Update checking process.
- Minor GUI improvements.
- Minor bug fixes.
- Improved Google Chrome Cookies cleaning.
- Improved Windows Memory Dumps cleaning.
- Improved Windows Error Reporting cleaning.
- Improved Windows Log Files cleaning.
- Improved Microsoft Office cleaning.
- Improved Solid-state drive (SSD) detection.
- Minor GUI improvements.
- Minor bug fixes.
- Improved Microsoft Edge Cookies management and cleaning.
- Improved Firefox History and Session cleaning.
- Improved Registry detection and cleaning algorithm.
- Improved secure deletion performance.
- Improved installer/uninstaller routines.
- Minor GUI improvements.
- Minor bug fixes.
- Improved Microsoft Edge Cache and Cookies cleaning.
- Improved Recycle Bin cleaning.
- Improved Solid-state drive (SSD) detection.
- Minor GUI improvements.
- Minor bug fixes.
- Improved Waterfox and Brave browser cleaning and monitoring.
- Improved Microsoft Edge History cleaning.
- Improved Registry cleaning for Obsolete Software and MUI Cache.
- Improved Windows 10 support and performance.
- Improved Auto-Update checking routine.
- Minor GUI improvements.
- Minor bug fixes.
- Added Waterfox browser cleaning and monitoring.
- Added Brave browser cleaning and monitoring.
- Improved Firefox Session cleaning.
- Improved Registry cleaning for Application Paths and Missing Shared DLLs.
- Improved File Slack Space and Alternate Data Streams cleaning on Windows 10.
- Improved Windows 10 Notifications & Actions Center support.
- Minor GUI improvements.
- Minor bug fixes.
- Improved Google Chrome Saved Form Information cleaning.
- Improved Memory and CPU usage.
- Improved localization and language support.
- Minor GUI improvements.
- Minor bug fixes.
- Improved Firefox Cache and Cookies cleaning.
- Improved Secure file deletion on exFAT file system.
- Improved Solid-state drive (SSD) detection.
- Improved Wipe MFT Free Space routine.
- Minor GUI improvements.
- Minor bug fixes.
- Improved Google Chrome Media Cache and Thumbnail cleaning.
- Improved Vivaldi cleaning and monitoring.
- Improved Include/Exclude Registry key entry format.
- Improved file scanning performance on Windows 10.
- Improved secure file deletion routines.
- Minor GUI improvements.
- Minor bug fixes.
- Improved Microsoft Edge Cookies management and cleaning.
- Improved Opera GPU and Application cache cleaning.
- Improved Windows 10 Notifications & Actions Center support.
- Improved registry scanning routines.
- Improved Portable version support.
- Improved localization and language support.
- Minor GUI improvements.
- Minor bug fixes.
- Improved Google Chrome Extension Cache and Cookies cleaning.
- Improved performance of Compact database routines for Google Chrome, Firefox and Opera.
- Improved Browser monitoring for Chromium based browsers.
- Improved Wipe MFT Free Space routine.
- Improved Plug-in testing routine.
- Improved Auto-Update checking routine.
- Minor GUI improvements.
- Minor bug fixes.
- Improved Internet Explorer Password cleaning for multiple users.
- Improved Google Chrome Cookies management and cleaning.
- Improved Thunderbird embedded browser cleaning.
- Improved Registry detection and backup support.
- Improved command line secure deletion.
- Improved loading speed of System Restore.
- Minor GUI improvements.
- Minor bug fixes.
- Improved Google Chrome Cookies cleaning.
- Improved Opera Cache and History cleaning.
- Improved Windows temp folder cleaning for multiple users on Windows 10.
- Improved Plug-in XML parser.
- Improved Custom Plug-ins routines.
- Improved loading speed of Add-ons Manager.
- Minor GUI improvements.
- Minor bug fixes.
- Improved Vivaldi/Comodo Dragon cleaning and monitoring.
- Improved support for hiding open windows of Google Chrome.
- Improved Multi-user profiles cleaning on Windows 10.
- Improved System and Browser monitoring.
- Improved loading speed of Uninstaller.
- Improved Installer engine.
- Minor GUI improvements.
- Minor bug fixes.
- Improved multiple profiles cleaning for Google Chrome.
- Improved SSD drives detection for Drive Wiper.
- Improved Plug-in testing routine.
- Improved Import/Export functionality for Custom Plug-ins.
- Improved loading speed of File Shredder.
- Updated various translations.
- Minor GUI improvements.
- Minor bug fixes.
- Improved Google Chrome Cookies cleaning.
- Improved Firefox Saved Password cleaning.
- Improved Wipe MFT Free Space routines on Windows 10.
- Improved File Slack Space and Alternate Data Streams cleaning on Windows 10.
- Improved uninstalling routines for Uninstaller.
- Improved internal call for global Exclude support.
- Minor GUI improvements.
- Minor bug fixes.
- Improved Google Chrome journal and tmp files cleaning.
- Improved Opera AutoFill Form History and Saved Password cleaning.
- Improved multiple-user profiles detection and cleaning.
- Improved intelligent algorithms for Wipe MFT Free Space routines.
- Improved Windows Log Files cleaning.
- Improved Pause/Resume routines.
- Minor GUI improvements.
- Minor bug fixes.
- Improved Microsoft Edge Cache, History and DOMStore cleaning.
- Improved Chrome Cache and History cleaning.
- Improved Opera History cleaning.
- Improved Windows 10 Registry detection and cleaning.
- Improved Schedule options for multiple users on Windows 10.
- Improved detection and cleaning of portable browsers.
- Improved Import/Export functionality for Custom Plug-ins.
- Improved code signing for program executable/installer/uninstaller.
- Minor GUI improvements.
- Minor bug fixes.
- Improved Microsoft Edge History and Session cleaning.
- Improved Chrome Last Download Location cleaning.
- Improved Wipe MFT Free Space routines on Windows 10.
- Improved Taskbar Jump Lists cleaning on Windows 10.
- Improved drag and drop functionality on Windows 10.
- Improved free space size detection on SSD.
- Improved Scheduling functionality.
- Improved multiple monitor support.
- Minor GUI improvements.
- Minor bug fixes.
- Improved Chrome and Opera History cleaning.
- Improved Firefox Cache and Session cleaning.
- Improved Chromium based browsers detection and cleaning.
- Improved loading speed of Cookie Manager.
- Improved command line parameters /Silent and /VerySilent.
- Improved global exception handling and reporting.
- Updated various translations.
- Minor GUI improvements.
- Minor bug fixes.
- Added Chinese (Simplified) language support.
- Improved Microsoft Edge Cookies cleaning.
- Improved support for local domains in Cookie Manager.
- Improved Firefox Cache and Session cleaning.
- Improved Thunderbird Session cleaning.
- Improved exception handling when cleaning jumplist on Windows 10.
- Improved environment variable support in Custom Locations.
- Improved localization and language support.
- Updated various translations.
- Minor GUI improvements.
- Minor bug fixes.
- Improved Windows 10 Fall Creators Update support.
- Improved Microsoft Edge and Internet Explorer Cookies cleaning.
- Improved Cookie Manager for Microsoft Edge and Internet Explorer on Windows 10.
- Improved Windows 10 Registry detection and cleaning.
- Improved Windows Explorer MRU Cache cleaning.
- Improved Solid-state drive (SSD) detection.
- Improved Foxit Reader, Xilisoft Video Converter and ZoneAlarm cleaning.
- Minor GUI improvements.
- Minor bug fixes.
- Improved Internet Explorer 10 and 11 Cache cleaning.
- Improved Google Chrome and Opera Session cleaning.
- Improved Thunderbird History cleaning.
- Improved Auto-Update checking process.
- Improved Uninstaller version sorting.
- Improved DPI awareness and high DPI support.
- Minor GUI improvements.
- Minor bug fixes.
- Improved Firefox Internet History cleaning.
- Improved File Shredder on 64-bit Windows 10.
- Improved Schedule Hourly accuracy on Windows 10.
- Improved 64-bit build architecture on Windows 10.
- Improved Solid-state drive (SSD) detection.
- Improved installer/uninstaller routines.
- Minor GUI improvements.
- Minor bug fixes.
- Improved Internet Explorer and Microsoft Edge Cache cleaning.
- Improved Firefox History and Cache cleaning.
- Improved Opera and Vivaldi Session cleaning.
- Improved detection and cleaning of portable browsers.
- Improved system monitoring startup procedure.
- Improved loading speed of Windows Startup Manager.
- Updated various translations.
- Minor GUI improvements.
- Minor bug fixes.
- Improved Vivaldi cleaning and monitoring.
- Improved Microsoft Edge Tab cleaning.
- Improved Shutdown after cleaning and /Clean command-line.
- Improved 64-bit build architecture for Windows 10.
- Improved Include and Exclude wildcard support.
- Improved Import/Export functionality for Custom Plug-ins.
- Improved loading speed of Add-ons Manager.
- Improved keyboard navigation and shortcuts.
- Minor GUI improvements.
- Minor bug fixes.
- Added Vivaldi browser cleaning and monitoring.
- Added Microsoft Edge Last Download Location cleaning.
- Improved Google Chrome Download History cleaning.
- Improved Windows 10 Registry detection and cleaning.
- Improved Windows Explorer MRUs cleaning.
- Improved Portable version support.
- Improved exception handling and reporting architecture.
- Improved localization and language support.
- Minor GUI improvements.
- Minor bug fixes.
- Improved Windows 10 Creators Update support.
- Improved Firefox Internet Cache cleaning.
- Improved Google Chrome Download History cleaning.
- Improved 64-bit Registry detection and cleaning architecture.
- Improved file security algorithms.
- Improved accuracy for uninstall items installation date and size.
- Improved Unicode support in Startup Manager.
- Minor GUI improvements.
- Minor bug fixes.
- Improved Microsoft Edge Cookies and History cleaning.
- Improved Google Chrome 64-bit support.
- Improved Firefox Download History cleaning.
- Improved ActiveX and Class Issue Registry cleaning.
- Improved Wipe Free Space algorithm.
- Improved internal architecture for better performance.
- Improved Windows keyboard shortcut support.
- Improved localization and language support.
- Minor GUI improvements.
- Minor bug fixes.
- Improved Internet Explorer and Microsoft Edge Cache cleaning.
- Improved Firefox History and Session cleaning.
- Improved detection of Chromium based browsers.
- Improved system monitoring startup procedure.
- Improved 64-bit build architecture on Windows 10.
- Improved and optimized Registry cleaning.
- Improved Scheduled Tasks detection.
- Improved file deletion security.
- Updated various translations.
- Minor GUI improvements.
- Minor bug fixes.
- Added Romanian language support.
- Improved Google Chrome Saved Passwords cleaning.
- Improved Firefox and Chrome History cleaning.
- Improved recursive folder analysis and cleaning.
- Improved System Restore discovery.
- Improved Startup Item tool compatibility.
- Improved Uninstaller Installation Date on Windows 10.
- Improved Auto-Update checking process.
- Improved Memory and CPU usage.
- Improved Unicode text support.
- Minor GUI improvements.
- Minor bug fixes.
- Improved Google Chrome Cache and History cleaning.
- Improved Firefox Search History cleaning.
- Improved Windows 10 Recycle Bin cleaning.
- Improved skip UAC warning for Monitoring.
- Improved live monitoring notifications and settings.
- Optimized internal architecture for faster start up.
- Optimized Start-up Items detection routine.
- Improved accuracy for uninstall items installation date and size.
- Improved Window resizing and DPI support.
- Minor GUI improvements.
- Minor bug fixes.
- Improved Microsoft Edge Cache and History cleaning.
- Improved Firefox History and Session cleaning.
- Improved Firefox Cookies detection.
- Improved detection and cleaning of portable browsers.
- Improved System and Browser Monitoring.
- Improved 64-bit Registry detection and cleaning architecture.
- Improved Skip UAC functionality for domain accounts.
- Improved Scheduled Tasks detection.
- Improved exception handling and reporting architecture.
- Improved keyboard navigation and shortcuts.
- Improved localization and language support.
- Minor GUI improvements.
- Minor bug fixes.
- Improved Microsoft Edge Temporary Files cleaning.
- Improved Google Chrome and Opera session cleaning.
- Improved Opera GPU and Application cache cleaning.
- Improved Windows 10 Registry cleaning.
- Optimized 64-bit build architecture.
- Improved memory usage and management architecture.
- Improved Include and Exclude wildcard support.
- Improved Shutdown after cleaning and /Shutdown command-line.
- Improved Auto-Update checking process.
- Improved DPI awareness and high DPI support.
- Improved localization and language support.
- Minor GUI improvements.
- Minor bug fixes.
- Improved Microsoft Edge Cookies and History cleaning.
- Improved Internet Explorer DOMStore cleaning.
- Improved Firefox Internet Cache cleaning.
- Improved Windows 10 Registry detection and cleaning.
- Improved Skip UAC on Windows 10.
- Improved Windows keyboard shortcut support.
- Improved Exclusion functionality for Registry cleaning.
- Improved Unicode text support.
- Minor GUI improvements.
- Minor bug fixes.
- Improved Microsoft Edge Cookies and History cleaning.
- Improved Google Chrome Saved Form Information and Saved Passwords cleaning.
- Improved File Slack Space and Alternate Data Streams cleaning.
- Improved Secure file deletion on FAT32 file system.
- Improved Recycle Bin cleaning and duplicated filenames.
- Improved Registry Cleaner detection algorithm.
- Improved Registry cleaning for Windows Services.
- Improved shortcut key accelerators.
- Minor GUI improvements.
- Minor bug fixes.
- Added Windows 10 Anniversary Update support.
- Improved Cookie Manager for Microsoft Edge/Internet Explorer on Windows 10.
- Improved DOMStore cookie domain discovery and cleaning.
- Improved Auto-Update checking process to avoid command line block.
- Improved Drive Wiper functionality for Windows 10.
- Improved Registry reading and cleaning algorithm.
- Improved Windows Services registry issue detection.
- Improved Uninstaller scanning and uninstalling routines.
- Improved search response when using wild cards.
- Improved localization and language support.
- Minor GUI improvements.
- Minor bug fixes.
- Improved Microsoft Edge Cache and History cleaning.
- Improved Google Chrome thumbnails and favicons cleaning.
- Improved Opera favicon cleaning by only deleting non-bookmarked entries.
- Improved Opera Last Download Location cleaning.
- Improved Recycle Bin cleaning.
- Improved exception handling when cleaning jumplist.
- Improved jumplist support to avoid possible UI lock.
- Improved scrolling for list control to avoid repaint problems.
- Improved Startup Manager functionality.
- Minor GUI improvements.
- Minor bug fixes.
- Added environment variable support in Custom Locations.
- Improved Chromium based browsers detection and cleaning.
- Improved database compacting to only run when needed.
- Improved Registry detection and backup support for Windows 10.
- Improved Registry detection algorithm for Missing Shared DLLs.
- Improved Registry cleaning for Application Paths.
- Improved Include/Exclude Options.
- Improved Include and Exclude screen when browsing for folders and files.
- Improved Custom Files and Folders accuracy to avoid duplicate reporting.
- Minor GUI improvements.
- Minor bug fixes.
- Added Opera cleaning for saved/opened directories paths.
- Added support for local domains in Cookie Manager.
- Improved Internet Explorer UserData cleaning and management.
- Improved better support for mouse-wheel in all screens.
- Improved file size accuracy when scanning and cleaning.
- Improved 'Install date' detection and accuracy for Uninstaller Tool.
- Improved file lock detection when scanning to avoid false reporting.
- Updated various translations.
- Minor GUI improvements.
- Minor bug fixes.
- Added Internet Explorer Cached Feeds and Add-ons Statistics cleaning.
- Improved Google Chrome IndexedDB, Quote Manager DB and Service Worker Cache cleaning.
- Improved detection and cleaning algorithm for Mozilla based browsers.
- Improved Registry cleaning for Obsolete Software and File Extensions.
- Improved 64-bit issue detection in Registry screen.
- Improved 64-bit support and performance.
- Improved file search algorithm when recursing.
- Improved security when deleting files.
- Improved system tray icon activation and tooltip.
- Improved sorting for listview control.
- Minor GUI improvements.
- Minor bug fixes.
- Added Google Chrome Media Cache and Thumbnail cleaning.
- Improved Registry Cleaner detection algorithm and 64-bit file system redirection.
- Improved file search history cleaning for Windows 10.
- Improved minimize to system tray functionality.
- Improved performance of Compact database routines.
- Improved 64-bit support when including/excluding files.
- Improved Exclude list registry keys addition functionality in 64-bit Windows 10.
- Improved support for wildcards and RECURSE.
- Improved multiple item selection and scrolling for listview control.
- Improved speed of Uninstaller Tool.
- Minor GUI improvements.
- Minor bug fixes.
- Added Opera GPU, Media and Application Cache cleaning.
- Added dual signing (SHA1 & SHA256) for program executable/installer/uninstaller.
- Improved Internet Explorer Cookies management and cleaning.
- Improved Firefox and Google Chrome support when browser is open.
- Improved global exception handling and reporting.
- Improved scan time accuracy.
- Improved command line secure deletion.
- Improved Uninstaller accuracy with MSI installers.
- Improved right-click menu options for section control.
- Improved accessibility features of listview control.
- Updated various translations.
- Minor GUI improvements.
- Minor bug fixes.
- Added global exception handling and reporting.
- Added Portuguese (Portugal) language support.
- Improved Microsoft Edge Cookies management and cleaning.
- Improved ActiveX/COM Components and Share DLLs registry cleaning.
- Improved Windows 10 Notifications & Actions Center support.
- Improved Windows right-click menu cleaning routine.
- Improved Options-Include/Exclude Registry key entry format.
- Improved Startup Manager loading routine.
- Improved XML file processing engine.
- Improved memory usage on Windows 10.
- Improved Media Player Classic, PDF Creator and TeamViewer cleaning.
- Minor GUI improvements.
- Minor bug fixes.
- Added keyboard support to remove selected items from listview control.
- Improved Windows 10 Notifications & Actions Center support.
- Improved File Extension scanning in Registry Cleaner.
- Improved Google Chrome Download History cleaning.
- Improved File scanning performance on NTFS drives.
- Improved internal memory management routines.
- Improved Portable version support.
- Improved localization and language support.
- Minor GUI improvements.
- Minor bug fixes.
- Added keyboard support to check/uncheck checkboxes for listview control.
- Improved Taskbar jump list tasks.
- Improved Uninstaller detection routine for Windows 10.
- Improved loading/saving settings to XML file.
- Improved installer routines to prevent false positives by antivirus programs.
- Improved error handling when opening Registry Editor.
- Optimized registry scanning routines.
- Optimized secure file deletion routines.
- Minor GUI improvements.
- Minor bug fixes.
- Added Taskbar jump list tasks.
- Improved Firefox 42 Cache and Cookies cleaning.
- Improved Google Chrome Cookies management and cleaning.
- Improved display routines to reduce flicker on Windows 10.
- Improved code signing for program executable/installer/uninstaller.
- Improved filename wiping for secure deletion.
- Improved secure deletion performance.
- Improved localization and language support.
- Minor GUI improvements.
- Minor bug fixes.
- Added Firefox HSTS (HTTP Strict Transport Security) Cookies cleaning.
- Added Chrome Extension Cache and Cookies cleaning.
- Added Spanish language support.
- Improved Plug-in architecture for better performance.
- Improved folder detection algorithm for plug-ins.
- Improved Wildcard behavior in search boxes.
- Updated various translations.
- Minor GUI improvements.
- Minor bug fixes.
- Added Clean & Restart / Clean & Shut down to Schedule options.
- Improved Registry Cleaner detection and cleaning routines for Windows 10.
- Improved Microsoft Edge Cached Feeds cleaning.
- Improved Firefox HttpOnly Cookies cleaning.
- Improved Google Chrome Most Visited Sites History cleaning.
- Improved Opera Recently Typed URLs cleaning.
- Added Camtasia Studio 8.0, Microsoft Office 2016, Nero 2015 Platinum and Nero Burning Rom 2015 cleaning.
- Improved FileZilla, GIMP, Internet Download Manager, K-Lite Codec Pack, LogMeIn, Malwarebytes Anti-Malware and Paint.NET cleaning.
- Updated various translations.
- Minor GUI improvements.
- Minor bug fixes.
- Added Thunderbird embedded browser cleaning.
- Added Bulgarian language support.
- Improved Microsoft Edge Cache, History and DOMStore cleaning.
- Improved Internet Explorer 10/11 Download History cleaning.
- Improved Google Chrome Download History cleaning.
- Improved detection and cleaning of portable browsers.
- Improved 64-bit build architecture for Windows 10.
- Updated various translations.
- Minor GUI improvements.
- Minor bug fixes.
- Added Windows 10 Notifications & Actions Center support.
- Added Microsoft Edge Session cleaning.
- Improved Internet Explorer 10/11 Cache, History and DOMStore cleaning.
- Improved Microsoft Edge Cache, History and Cookies cleaning.
- Improved Opera Cookies cleaning.
- Improved Browser monitoring for Microsoft Edge.
- Improved Wipe MFT Free Space routine for Windows 10.
- Improved Auto-Update checking routine.
- Improved localization support.
- Updated various translations.
- Minor GUI improvements.
- Minor bug fixes.
- Added Windows 10 official version support.
- Added Microsoft Edge cleaning and monitoring.
- Improved Google Chrome Cache, Cookies and Session cleaning.
- Improved Opera Cache, History and Session cleaning.
- Improved Browser monitoring routine.
- Improved secure deletion of files with long filenames.
- Added Adobe Reader DC, Foxit Reader 7 and RealTimes cleaning.
- Improved Avira Antivirus, BlueStacks and Media Player Classic cleaning.
- Improved Unicode and localization support.
- Updated various translations.
- Minor GUI improvements.
- Minor bug fixes.
- Added Cyberfox browser cleaning.
- Added IndexedDB cleaning for Google Chrome and Opera.
- Added Japanese language support.
- Improved Profile Manager.
- Improved Cookie Manager.
- Improved multiple profiles cleaning for Google Chrome.
- Improved Schedule options for multiple users.
- Updated various translations.
- Minor GUI improvements.
- Minor bug fixes.
- Added Registry Cleaner.
- Added Profile Manager for Firefox, Google Chrome and Opera.
- Improved internal architecture for better performance.
- Improved Internet Explorer History cleaning.
- Improved System and Browser monitoring.
- Improved Solid-state drive (SSD) detection.
- Improved App Uninstaller uninstalling routine.
- Improved Startup Manager and Drive Wiper refresh routines.
- Updated various translations.
- Minor GUI improvements.
- Minor bug fixes.
- Added Yandex browser cleaning.
- Added Czech language support.
- Improved Firefox Session cleaning.
- Improved Google Chrome Cookies cleaning.
- Improved Opera History and Cookies cleaning.
- Improved Plug-in testing routine.
- Improved Recycle Bin cleaning.
- Improved Uninstaller engine.
- Updated various translations.
- Minor GUI improvements.
- Minor bug fixes.
- Added Import/Export functionality for Custom Plug-ins.
- Improved Windows 10 Technical Preview (Build 9926) compatibility.
- Improved multiple profiles cleaning for Firefox and Google Chrome.
- Improved removed and dismounted drives detection for Drive Wiper.
- Improved Auto-Update checking routine.
- Added Slovenian language support.
- Updated various translations.
- Minor GUI improvements.
- Minor bug fixes.
- Added SeaMonkey browser cleaning.
- Improved Firefox Saved Password cleaning.
- Improved Opera Cache and History cleaning.
- Improved drag and drop functionality for File Shredder.
- Improved Auto-Update checking routine.
- Improved Installer engine.
- Updated various translations.
- Minor improvements.
- Minor bug fixes.
- Added Solid-state drive (SSD) detection for Drive Wiper.
- Added search box to System Restore Manager.
- Improved Firefox Session cleaning.
- Improved Schedule options for multiple users.
- Improved Skip User Account Control warning for multiple users.
- Improved Operating System detection for Windows 8.1/10.
- Added Anonymizer, Gadu-Gadu, InkScape, MailWasher and VSO DVD Converter cleaning.
- Improved Adobe Reader Touch, AntiVir Desktop, Skype App and Twitter App cleaning.
- Minor improvements.
- Minor bug fixes.
- Added search box to Windows Startup Manager.
- Added support for Google Chrome 64-bit.
- Improved Opera 12 and previous versions detection.
- Improved Wipe MFT Free Space routines.
- Added cleaning for 4Sync, Any Video Converter, DVDFab, Internet Download Manager, PDF-XChange Viewer and SMPlayer.
- Improved cleaning for Corel PaintShop Pro, XML Spy and ZipMagic.
- Minor improvements.
- Minor bug fixes.
- Added Windows 10 Technical Preview compatibility.
- Added Wipe MFT/FAT Free Space options.
- Changed Wipe MFT/FAT Free Space to run before Wipe Free Space.
- Improved Wipe MFT Free Space routines by adding intelligent algorithms, wiping speed increased more than 1000%!
- Improved Cookies Manager for Google Chrome.
- Improved cleaning for Norton AntiVirus, RealPlayer, RealPlayer Cloud, RegEditX, Sony Vegas Pro, TextPad, TUGZip, UltraISO, Universal Extractor, VLC Media Player, WinDiff, Windows Media Player, WinRAR and WinZip.
- Added Italian language support.
- Updated various translations.
- Minor improvements.
- Minor bug fixes.
- Added Opera 15 and newer AutoFill Form History cleaning.
- Added cleaning for Opera Developer edition.
- Improved Opera Saved Password cleaning.
- Improved Google Chrome AutoFill Form History and Saved Password cleaning.
- Improved multiple user profiles detection.
- Updated various translations.
- Added cleaning for Ashampoo Burning Studio 14, BlueStacks, FastStone Capture, ManyCam, PhotoScape and XnView.
- Improved cleaning for ImgBurn, IZArc, JASC Paint Shop Pro, K-Lite Codec Pack, LogMeIn, Media Player Classic, Microsoft Office, MSN Toolbar, NewsBin Pro, PerfectDisk, PicoZip, PowerArchiver and PowerISO.
- Minor improvements.
- Minor bug fixes.
- Improved 64-bit build architecture for Windows Vista.
- Improved system tray notification for Windows XP.
- Improved Windows temp folder cleaning for multiple users on Windows XP.
- Improved Index.dat files cleaning for Internet Explorer 9 and previous version.
- Fixed bug in multiple user profiles detection.
- Minor optimization tweaks.
Textpad Free Download For Windows Xp Service Pack
- Added Multi-user profiles cleaning.
- Added System and Browser monitoring.
- Added Arabic language support.
- Improved 64-bit build architecture for Windows 7, 8 and 8.1.
- Improved internal architecture for better performance.
- Improved internal call for global Exclude support.
- Improved automatic update checker.
- Improved Internet Explorer AutoComplete Form History cleaning.
- Improved Firefox Saved Password cleaning.
- Improved Recycle Bin cleaning.
- Improved Thumbnail Cache cleaning.
- Improved uninstalling routines for App Uninstaller.
- Improved Pause/Resume routines.
- Improved Custom Plug-ins routines.
- Fixed bug in secure deletion of files with long filenames.
- Updated various translations.
- Added cleaning for Adobe Photoshop Elements 12 and Premiere Elements 12, Format Factory, SnagIt 12, Tag&Rename and Tango.
- Improved cleaning for FeedDemon, Foxit Reader, Freemake Audio Converter and Video Converter, GetRight, Gom Player, Google Deskbar and Google Earth.
- Minor GUI improvements.
- Minor optimization tweaks and bug fixes.
- Added right-click menu to Summary Results list.
- Added new cache location cleaning for Firefox 31.
- Added Portuguese (Brazilian) language support.
- Updated various translations.
- Optimized database compacting for Firefox, Google Chrome and Opera.
- Fixed bug in Drive Wiper when wiping free space.
- Fixed bug in Add-ons Manager detection algorithm.
- Fixed bug in user SID detection.
- Added cleaning for CyberLink AudioDirector 4 and PowerDirector 12, dBpoweramp, Microsoft OneDrive, Nitro PDF Reader 3, TeamViewer 9, Virtual DJ 8 and VNCViewer 5.
- Improved cleaning for Babylon Translator, BitZipper, Camtasia Studio, CoffeeCup DirectFTP and HTML Editor, Compare It!, Corel Paint Shop Pro, CyberLink PowerDirector, DVD Shrink, eMule and ExamDiff.
- Minor GUI improvements.
- Minor bug fixes.
- Added automatic checking for updates.
- Added Dutch language support.
- Updated Korean translation.
- Improved Add-ons Manager detection algorithm for 32-bit program version.
- Improved Windows Log Files cleaning.
- Improved cleaning lost files & folders for Recycle Bin.
- Improved Internet History cleaning for Google Chrome and Opera.
- Improved global Exclude options support.
- Improved Installer engine.
- Fixed file search bug when recursing.
- Added cleaning for Windows Store apps: Bing Search, Bing News, Bing Maps, Bing Finance, Bing Sports, Bing Travel, Bing Weather, Bing Food & Drink and Bing Health & Fitness.
- Improved cleaning for 7-Zip, ACDSee, AceHTML, Adobe Fireworks, Adobe ImageReady, Advanced Browser, AIMP, AkelPad, AlZip, AntiVir Desktop, Avant Browser and Axialis IconWorkshop.
- Minor GUI improvements.
- Minor bug fixes.
- Added global Exclude options to Settings dialog.
- Added checkbox to enable/disable Keyboard shortcuts.
- Added Polish language support.
- Added cleaning for ABBYY FineReader 11, Kingsoft Office 2013, Nero 14 Platinum HD, Nero Express 2014, Nero Burning Rom 2014, Nitro Pro 9 and Stardock WindowBlinds.
- Improved cleaning for Adobe Shockwave 10 and 11, AVG AntiVirus 2012 and 2013, Java, Microsoft Office 2010 and 2013.
- Improved cleaning for Google Chrome: journal and tmp files.
- Improved cleaning for Recycle Bin.
- Improved Installer engine.
- Optimized Plug-in parser, parsing times reduced by 20%.
- Minor GUI improvements.
- Minor bug fixes.
- Added Add-ons Manager to manage installed add-ons in Internet Explorer.
- Added 'Secure Erase with Privacy Eraser' option to Windows Explorer context menu.
- Added support for Pale Moon browser.
- Added support for SRWare Iron browser.
- Added Russian language support.
- Added cleaning for CDBurnerXP, Foxit Phantom PDF, Photodex ProShow Producer, PowerArchiver 2013 and SketchUp Make 2013.
- Improved cleaning for CA Anti-Virus, CuteFTP 9, Foxit Reader 6, FrostWire, OpenOffice 4, Orbit Downloader, Oxygen XML Editor, Steam, Vuze and Xfire.
- Improved free space size detection when wiping free space.
- Updated various translations.
- Fixed Total size accuracy issue for Drive Wiper.
- Minor GUI improvements.
- Minor optimization tweaks and bug fixes.
- Added Cookies Manager for Opera 15 or higher.
- Added support for Comodo Dragon and IceDragon browser.
- Added support for hiding open windows of Google Chrome.
- Added support for hiding open windows of Opera 15 or higher.
- Added support for hiding open windows of Safari.
- Added Korean language support.
- Added Turkish language support.
- Added cleaning for Aimersoft Video Converter Ultimate, Sublime Text, Wondershare Video Converter Pro and Ultimate, Xilisoft Video Converter and DVD Ripper.
- Improved cleaning for Free Download Manager, Internet Download Manager, Java, MusicMatch Jukebox, Nero Video 11 and WinZip.
- Improved Chromium based browsers detection and cleaning.
- Fixed Time remaining underflow issue.
- Minor GUI improvements.
- Minor plug-in architecture improvements.
- Minor optimization tweaks and bug fixes.
- Added support for Windows 8.1 Update 1 and Server 2012 R2 Update 1.
- Added support for Firefox 29 final release.
- Added support for Google Chrome 35.0 beta.
- Added support for Opera 20 final release.
- Added Cookies Manager for Mozilla Firefox.
- Added Cookies Manager for Google Chrome.
- Added showing of application icons in Windows Startup Manager.
- Added cleaning for Alcohol 52%, Corel PaintShop Pro X6, Facebook Metro, HandBrake, Nero BackItUp 2014, Picasa 3, Real Player Cloud, SyncBackFree, The Bat and UltraEdit.
- Improved cleaning for Alcohol 120%, Camfrog Video Chat, eMule, FileZilla, Google Earth, Microsoft AntiSpyware, QuickTime, SUPERAntiSpyware, Winamp and Windows Live Messenger.
- Improved Time elapsed accuracy when scanning/cleaning.
- Optimized application startup speed, loading times reduced by 30%.
- Minor GUI improvements.
- Minor bug fixes.
- Added Portable version support, which you can download here.
- Added App Uninstaller to manage installed applications.
- Added support for Torch browser.
- Added support for K-Meleon browser.
- Added cleaning for Adobe Premiere Pro CC, Agent NewsReader, CuteFTP 9, Directory Opus 10, OpenOffice 4 and Sony Vegas Pro 12.
- Improved accuracy for free space size when scanning/cleaning.
- Fixed 'Load at Windows startup' issue.
- Fixed 'Last Download Location' cleaning issue for Firefox.
- Fixed Time elapsed & Time remaining accuracy issue for File Shredder.
- Minor GUI improvements.
- Minor bug fixes.
- Added French language support.
- Fixed Security Options saving issue.
- Minor GUI improvements.
- Minor bug fixes.
- Added support for Chromium based browsers.
- Added support for cleaning multiple profiles in Google Chrome.
- Added support to manage System Restore Points.
- Added localization and multi-language support.
- Added Hungarian language support.
- Added multiple monitor support.
- Fixed 'Automatically clean at Windows startup' issue.
- Minor improvements.
- Minor bug fixes.
- Added 'Open Privacy Eraser...' and 'Secure Erase with Privacy Eraser' options to Recycle Bin context menu.
- Added 'Compact Databases' option for Mozilla Firefox, Google Chrome and Opera.
- Added 'Show system tray notification' option.
- Added new command line parameters /Silent and /VerySilent.
- Improved Safari History cleaning.
- Minor GUI improvements.
- Minor optimization tweaks and bug fixes.
- Added support for Google Chrome Canary.
- Added command line parameters /Clean, /Restart and /Shutdown.
- Added command line exporting of embedded Plug-ins.xml and Plug-ins2.xml (/Export ['folder path']).
- Improved Taskbar Jump Lists cleaning for Windows 7/8.
- Optimized executable file size, installation package size reduced by 40%.
- Minor GUI improvements.
- Minor plug-in architecture improvements.
- Minor optimization tweaks and bug fixes.
- Redesigned brand new user interface.
- Completely rebuild in highly optimized C++.
- Optimized, fast scanning and cleaning speed.
- Flexible, highly customizable and open plug-in architecture.
- Fully support Unicode.
- Provide both 32-bit and 64-bit versions.
- Gson Tutorial
- Gson Useful Resources
- Selected Reading
Google Gson is a simple Java-based library to serialize Java objects to JSON and vice versa. It is an open-source library developed by Google.
The following points highlight why you should be using this library −
Standardized − Gson is a standardized library that is managed by Google.
Efficient − It is a reliable, fast, and efficient extension to the Java standard library.
Optimized − The library is highly optimized.
Support Generics − It provides extensive support for generics.
Supports complex inner classes − It supports complex objects with deep inheritance hierarchies.
Features of Gson
Here is a list of some of the most prominent features of Gson −
Easy to use − Gson API provides a high-level facade to simplify commonly used use-cases.
No need to create mapping − Gson API provides default mapping for most of the objects to be serialized.
Performance − Gson is quite fast and is of low memory footprint. It is suitable for large object graphs or systems.
Clean JSON − Gson creates a clean and compact JSON result which is easy to read.
No Dependency − Gson library does not require any other library apart from JDK.
Open Source − Gson library is open source; it is freely available.
Three Ways of Processing JSON
Gson provides three alternative ways to process JSON −
Streaming API
It reads and writes JSON content as discrete events. JsonReader and JsonWriter read/write the data as token, referred as JsonToken.
It is the most powerful approach among the three approaches to process JSON. It has the lowest overhead and it is quite fast in read/write operations. It is analogous to Stax parser for XML.
Tree Model
It prepares an in-memory tree representation of the JSON document. It builds a tree of JsonObject nodes. It is a flexible approach and is analogous to DOM parser for XML.
Data Binding
It converts JSON to and from POJO (Plain Old Java Object) using property accessor. Gson reads/writes JSON using data type adapters. It is analogous to JAXB parser for XML.
Local Environment Setup
If you still want to set up a local environment for Java programming language, then this section will guide you on how to download and set up Java on your machine. Please follow the steps given below, to set up the environment.
Java SE is freely available from the link Download Java. So you download a version based on your operating system.
Follow the instructions to download Java and run the .exe to install Java on your machine. Once you have installed Java on your machine, you would need to set the environment variables to point to their correct installation directories.
Setting up the Path in Windows 2000/XP
Assuming you have installed Java in c:Program Filesjavajdk directory −
Right-click on 'My Computer' and select 'Properties'.
Click on the 'Environment variables' button under the 'Advanced' tab.
Next, alter the 'Path' variable so that it also contains the path to the Java executable. For example, if the path is currently set to 'C:WINDOWSSYSTEM32', then change your path to read 'C:WINDOWSSYSTEM32;c:Program Filesjavajdkbin'.
Setting up the Path in Windows 95 / 98 / ME
Assuming you have installed Java in c:Program Filesjavajdk directory −
Edit the 'C:autoexec.bat' file and add the following line at the end: 'SET PATH=%PATH%;C:Program Filesjavajdkbin'
Setting up the Path for Linux, UNIX, Solaris, FreeBSD
Textpad For Windows 10 Free
The environment variable PATH should be set to point to where the Java binaries have been installed. Refer to your shell documentation if you have trouble doing this.
For example, if you use bash as your shell, then you would add the following line to the end of your '.bashrc: export PATH=/path/to/java:$PATH'
Popular Java Editors
To write your Java programs, you will need a text editor. There are quite a few sophisticated IDEs available in the market. But for now, you can consider one of the following −
Notepad − On Windows, you can use any simple text editor like Notepad (Recommended for this tutorial) or TextPad.
Netbeans − It is a Java IDE that is open-source and free which can be downloaded from https://netbeans.org/index.html.
Eclipse − It is also a Java IDE developed by the Eclipse open-source community and can be downloaded from https://www.eclipse.org/.
Download Gson Archive
Download the latest version of Gson jar file from gson-2.3.1.jar. At the time of writing this tutorial, we downloaded gson-2.3.1.jar and copied it into C:>gson folder.
OS | Archive name |
---|---|
Windows | gson-2.3.1.jar |
Linux | gson-2.3.1.jar |
Mac | gson-2.3.1.jar |
Set Gson Environment
Set the GSON_HOME environment variable to point to the base directory location where Gson jar is stored on your machine.
OS | Output |
---|---|
Windows | Set the environment variable GSON_HOME to C:gson |
Linux | export GSON_HOME=/usr/local/gson |
Mac | export GSON_HOME=/Library/gson |
Set CLASSPATH variable
Set the CLASSPATH environment variable to point to the Gson jar location.
OS | Output |
---|---|
Windows | Set the environment variable CLASSPATH to %CLASSPATH%;%GSON_HOME%gson-2.3.1.jar;.; |
Linux | export CLASSPATH=$CLASSPATH:$GSON_HOME/gson-2.3.1.jar:. |
Mac | export CLASSPATH=$CLASSPATH:$GSON_HOME/gson-2.3.1.jar:. |
Textpad Free Download For Windows Xp Sp3
Before going into the details of the Google Gson library, let's see an application in action. In this example, we've created a Student class. We'll create a JSON string with student details and deserialize it to student object and then serialize it to an JSON String.
Example
Create a Java class file named GsonTester in C:>GSON_WORKSPACE.
File − GsonTester.java
Verify the result
Compile the classes using javac compiler as follows −
Now run the GsonTester to see the result −
Verify the output.
Steps to Remember
Following are the important steps to be considered here.
Step 1 − Create Gson object using GsonBuilder
Create a Gson object. It is a reusable object.
Step 2 − Deserialize JSON to Object
Use fromJson() method to get the Object from the JSON. Pass Json string / source of Json string and object type as parameter.
Step 3 − Serialize Object to JSON
Use toJson() method to get the JSON string representation of an object.
Gson is the main actor class of Google Gson library. It provides functionalities to convert Java objects to matching JSON constructs and vice versa. Gson is first constructed using GsonBuilder and then, toJson(Object) or fromJson(String, Class) methods are used to read/write JSON constructs.
Class Declaration
Following is the declaration for com.google.gson.Gson class −
Constructors
Sr.No | Constructor & Description |
---|---|
1 | Gson() Constructs a Gson object with default configuration. |
Class Methods
Sr.No | Method & Description |
---|---|
1 | T fromJson(JsonElement json, Class classOfT) This method deserializes the Json read from the specified parse tree into an object of the specified type. |
2 | T fromJson(JsonElement json, Type typeOfT) This method deserializes the Json read from the specified parse tree into an object of the specified type. |
3 | T fromJson(JsonReader reader, Type typeOfT) Reads the next JSON value from reader and convert it to an object of type typeOfT. |
4 | T fromJson(Reader json, Class classOfT) This method deserializes the Json read from the specified reader into an object of the specified class. |
5 | T fromJson(Reader json, Type typeOfT) This method deserializes the Json read from the specified reader into an object of the specified type. |
6 | T fromJson(String json, Class classOfT) This method deserializes the specified Json into an object of the specified class. |
7 | T fromJson(String json, Type typeOfT) This method deserializes the specified Json into an object of the specified type. |
8 | TypeAdapter getAdapter(Class type) Returns the type adapter for type. |
9 | TypeAdapter getAdapter(TypeToken type) Returns the type adapter for type. |
10 | TypeAdapter getDelegateAdapter(TypeAdapterFactory skipPast, TypeToken type) This method is used to get an alternate type adapter for the specified type. |
11 | String toJson(JsonElement jsonElement) Converts a tree of JsonElements into its equivalent JSON representation. |
12 | void toJson(JsonElement jsonElement, Appendable writer) Writes out the equivalent JSON for a tree of JsonElements. |
13 | void toJson(JsonElement jsonElement, JsonWriter writer) Writes the JSON for jsonElement to writer. |
14 | String toJson(Object src) This method serializes the specified object into its equivalent Json representation. |
15 | void toJson(Object src, Appendable writer) This method serializes the specified object into its equivalent Json representation. |
16 | String toJson(Object src, Type typeOfSrc) This method serializes the specified object, including those of generic types, into its equivalent Json representation. |
17 | void toJson(Object src, Type typeOfSrc, Appendable writer) This method serializes the specified object, including those of generic types, into its equivalent Json representation. |
18 | void toJson(Object src, Type typeOfSrc, JsonWriter writer) Writes the JSON representation of src of type typeOfSrc to writer. |
19 | JsonElement toJsonTree(Object src) This method serializes the specified object into its equivalent representation as a tree of JsonElements. |
20 | JsonElement toJsonTree(Object src, Type typeOfSrc) This method serializes the specified object, including those of generic types, into its equivalent representation as a tree of JsonElements. |
21 | String toString() |
Methods inherited
This class inherits methods from the following class −
- java.lang.Object
Example
Create the following Java program using any editor of your choice, and save it at, say, C:/> GSON_WORKSPACE
File − GsonTester.java
Verify the result
Compile the classes using javac compiler as follows −
Now run the GsonTester to see the result −
Verify the output
Let's serialize a Java object to a Json file and then read that Json file to get the object back. In this example, we've created a Student class. We'll create a student.json file which will have a json representation of Student object.
Example
Create a Java class file named GsonTester in C:>GSON_WORKSPACE.
File - GsonTester.java
Verify the result
Compile the classes using javac compiler as follows −
Now run the GsonTester to see the result −
Verify the Output
Data Binding API is used to convert JSON to and from POJO (Plain Old Java Object) using property accessor or using annotations. It is of two types.
Primitives Data Binding − Converts JSON to and from Java Maps, Lists, Strings, Numbers, Booleans, and NULL objects.
Objects Data Binding − Converts JSON to and from any JAVA type.
Gson reads/writes JSON for both types of data bindings. Data Binding is analogous to JAXB parser for XML.
Primitives Data Binding
Primitives data binding refers to mapping of JSON to JAVA Core data types and inbuilt collections. Gson provides various inbuilt adapters which can be used to serialize/deserialize primitive data types.
Example
Let's see primitive data binding in action. Here we'll map JAVA basic types directly to JSON and vice versa.
Create a Java class file named GsonTester in C:>Gson_WORKSPACE.
File − GsonTester.java
Verify the result
Compile the classes using javac compiler as follows −
Now run the GsonTester to see the result −
Verify the output.
Object data binding refers to mapping of JSON to any JAVA Object.
Example
Let's see object data binding in action. Here we'll map JAVA Object directly to JSON and vice versa.
Create a Java class file named GsonTester in C:>GSON_WORKSPACE.
File - GsonTester.java
Verify the result
Compile the classes using javac compiler as follows −
Now run the GsonTester to see the result −
Verify the output.
Tree Model prepares an in-memory tree representation of the JSON document. It builds a tree of JsonObject nodes. It is a flexible approach and is analogous to DOM parser for XML.
Create Tree from JSON
JsonParser provides a pointer to the root node of the tree after reading the JSON. Root Node can be used to traverse the complete tree. Consider the following code snippet to get the root node of a provided JSON String.
Traversing Tree Model
Get each node using relative path to the root node while traversing the tree and process the data. The following code snippet shows how you can traverse a tree.
Example
Create a Java class file named GsonTester in C:>GSON_WORKSPACE.
File − GsonTester.java
Verify the result
Compile the classes using javac compiler as follows −
Now run the GsonTester to see the result −
Verify the output.
Streaming API is used to read JSON token by token. It reads and writes JSON content as discrete events. JsonReader and JsonWriter read/write the data as token, referred as JsonToken.
It is the most powerful approach among the three approaches to process JSON. It has the lowest overhead and it is quite fast in read/write operations. It is analogous to Stax parser for XML.
In this chapter, we will showcase the usage of GSON streaming APIs to read JSON data. Streaming API works with the concept of token and every details of Json is to be handled carefully.
Example
Let's see JsonReader in action. Create a Java class file named GsonTester in C:>GSON_WORKSPACE.
File - GsonTester.java
Verify the result
Compile the classes using javac compiler as follows −
Now run the GsonTester to see the result −
Verify the output.
In this chapter, we will discuss the serialization/deserialization of arrays, collections, and generics.
Array Example
Example
Let's see Array serialization/de-serialization in action. Create a Java class file named GsonTester in C:>GSON_WORKSPACE.
File − GsonTester.java
Verify the result
Compile the classes using javac compiler as follows −
Now run the GsonTester to see the result −
Verify the output.
Collections Example
Example
Let's see Collection serialization/de-serialization in action. Create a Java class file named GsonTester in C:>GSON_WORKSPACE.
File − GsonTester.java
Verify the result
Compile the classes using javac compiler as follows −
Now run the GsonTester to see the result −
Verify the output.
Generics Example
Gson uses Java reflection API to get the type of the object to which a Json text is to be mapped. But with generics, this information is lost during serialization. To counter this problem, Gson provides a class com.google.gson.reflect.TypeToken to store the type of the generic object.
Example
Let's see Generics serialization/de-serialization in action. Create a Java class file named GsonTester in C:>GSON_WORKSPACE.
File − GsonTester.java
Verify the result
Compile the classes using javac compiler as follows −
Now run the GsonTester to see the result −
Verify the output.
In this chapter, we will explain serialization/deserialization of classes having inner classes.
Nested Inner Class example
Example
Let's see an example of serialization/de-serialization of class with an inner class in action. Create a Java class file named GsonTester in C:>GSON_WORKSPACE.
File − GsonTester.java
Verify the result
Compile the classes using javac compiler as follows −
Now run the GsonTester to see the result −
Verify the output.
Nested Static Inner Class Example
Example
Let's see an example of serialization/de-serialization of class with a static inner class in action. Create a Java class file named GsonTester in C:>GSON_WORKSPACE.
File − GsonTester.java
Verify the result
Compile the classes using javac compiler as follows −
Now run the GsonTester to see the result −
Verify the output.
Gson performs the serialization/deserialization of objects using its inbuilt adapters. It also supports custom adapters. Let's discuss how you can create a custom adapter and how you can use it.
Create a Custom Adapter
Create a custom adapter by extending the TypeAdapter class and passing it the type of object targeted. Override the read and write methods to do perform custom deserialization and serialization respectively.
Register the Custom Adapter
Register the custom adapter using GsonBuilder and create a Gson instance using GsonBuilder.
Use the Adapter
Gson will now use the custom adapter to convert Json text to object and vice versa.
Example
Let's see an example of custom type adapter in action. Create a Java class file named GsonTester in C:>GSON_WORKSPACE.
File − GsonTester.java
Verify the result
Compile the classes using javac compiler as follows −
Now run the GsonTester to see the result −
Verify the output.
Gson by default generates optimized Json content ignoring the NULL values. But GsonBuilder provides flags to show NULL values in the Json output using the GsonBuilder.serializeNulls() method.
Example without serializeNulls Call
Create a Java class file named GsonTester in C:>GSON_WORKSPACE.
File - GsonTester.java
Verify the result
Compile the classes using javac compiler as follows −
Now run the GsonTester to see the result −
Verify the output.
Example with serializeNulls call
Create a Java class file named GsonTester in C:>GSON_WORKSPACE.
File - GsonTester.java
Verify the result
Compile the classes using javac compiler as follows −
Now run the GsonTester to see the result −
Verify the output.
Gson provides @Since annotation to control the Json serialization/deserialization of a class based on its various versions. Consider the following class with versioning support. In this class, we've initially defined two variables rollNo and name and later on, we added verified as a new variable. Using @Since, we've defined rollNo and name as of version 1.0 and verified to be of version 1.1.
GsonBuilder provides the setVersion() method to serialize such versioned class.
Example
Let's see an example of versioning support in action. Create a Java class file named GsonTester in C:>GSON_WORKSPACE.
File - GsonTester.java
Verify the result
Compile the classes using javac compiler as follows −
Now run the GsonTester to see the result −
Verify the output.
By default, GSON excludes transient and static fields from the serialization/deserialization process. Let's take a look at the following example.
Example
Create a Java class file named GsonTester in C:>GSON_WORKSPACE.
File − GsonTester.java
Verify the result
Compile the classes using javac compiler as follows −
Now run the GsonTester to see the result −
Verify the output
Using excludeFieldsWithModifiers
GsonBuilder provides control over excluding fields with particular modifier using excludeFieldsWithModifiers() method from serialization/deserialization process. See the following example.
Example
Create a Java class file named GsonTester in C:>GSON_WORKSPACE.
File − GsonTester.java
Verify the result
Compile the classes using javac compiler as follows −
Now run the GsonTester to see the result −
Verify the output
Using @Expose Annotation
Gson provides @Expose annotation to control the Json serialization/deserialization of a class based on its scope. Consider the following class with a variable having @Expose support. In this class, name and rollno variables are to be exposed for serialization. Then we've used the GsonBuilder.excludeFieldsWithoutExposeAnnotation() method to indicate that only exposed variables are to be serialized/deserialized. See the following example.
Example
Create a Java class file named GsonTester in C:>GSON_WORKSPACE.
File − GsonTester.java
Verify the result
Compile the classes using javac compiler as follows −
Now run the GsonTester to see the result −
Verify the output