German Website
Home Features Screenshots Videos Downloads Shop Knowledgebase

Search Knowledgebase:


Monitor JSON files

User question:

> I need to monitor the content of a JSON file but WSW only checks the

> file by file date. I would also like to reformat the JSON file as it

> does not have any line breaks. Possible?

Adjust the file type

If WebSite-Watcher monitors the JSON file by file date, you have to manually change the file type to "text" in the bookmark properties first. Then this JSON will be handled as text file and WSW will monitor this file by content instead of the file date.


1. Open the bookmark properties

2. Select the "Advanced" tab

3. Select "Check options" on the left side

4. Change the file type to "text"




Format JSON file

If the JSON file has no line breaks, then you can create a simple private plugin to apply some basic formatting.


1. Open the bookmark properties

2. Select the "Advanced" tab

3. Select "Plugin" on the left side

4. Click the button "Create Private Plugin"

5. Enter this plugin code


Sub Wsw_PreprocessPage(ByRef $sMem, ByRef $sStatusMessage, ByRef $iStatusCode)
   $sMem = Replace($sMem, "{", CRLF + "{")
   $sMem = Replace($sMem, ",", "," + CRLF + "   ")
   $sMem = Replace($sMem, "}", CRLF + "}")
End Sub


6. Close and check the bookmark







Content without private plugin:




Content with basic formatting (via private plugin):