Login / Register
▼
Binary Fortress
Binary Fortress Software
CheckCentral
ClipboardFusion
CloudShow
DisplayFusion
FileSeek
HashTools
LogFusion
Notepad Replacer
Online Base64 Decoder
Online Base64 Encoder
Online JSON Formatter
ShellSend
TrayStatus
VoiceBot
WallpaperFusion
Window Inspector
More Apps...
DisplayFusion
CheckCentral
CloudShow
ClipboardFusion
FileSeek
VoiceBot
WallpaperFusion
▼
Download
Download
Change Log
Download Beta
Beta Change Log
License (EULA)
▼
Features
Features
HotKeys
Macros
Triggers
Clipboard Syncing
Clipboard Manager
Languages
Free vs Pro
Purchase
Screenshots
Apps
▼
Online
Online
Recent Items
Pinned Items
▼
Help
Help Guide
FAQ
Discussions
Contact Us
Find My License
Mailing Address
Advanced Settings
Macros
Languages
Clipboard
Fusion
WARNING: You currently have Javascript disabled!
This website will not function correctly without Javascript enabled.
Title
Message
OK
Confirm
Yes
No
Prettify JSON
Return to ClipboardFusion Macros
Description
Replace non-formatted JSON value with a pretty-print. Values that cannot be parsed as JSON remain unchanged. Requires the Newtonsoft JSON library.
Language
C# (.Net)
Minimum Version
5.6+
Created By
pankraty53915
Contributors
-
Date Created
Aug 19, 2019
Date Last Modified
Aug 19, 2019
Macro Code
Copy
Select All
Toggle Line Wrapping
using Newtonsoft.Json.Linq; public static class ClipboardFusionHelper { public static string ProcessText(string text) { string formatted; if (TryFormatJson(text, out formatted)) return formatted; return text; } private static bool TryFormatJson(string text, out string res) { try { res = JToken.Parse(text).ToString(); return true; } catch { res = text; return false; } } }
Copyright © 2007-2021 Binary Fortress Software
•
News
•
Discussions
•
FAQ
•
Support
•
Privacy
•
ToS
•
Get Binary Fortress Merch