It isn’t JSON code for the custom labelling, it’s actually a type of Mustache syntax. Anything inside {{double curlys}} gets evaluated. So it is possible to put in variable names and basic JavaScript functions.
It is possible to use basic JavaScript functions such as:
{{Name.replace('.domain.local','')}}, Host: {{HostServerName}}
To find the variable names that you can use for an object, you can use the Operations Manager Shell to query SCOM:
Get-SCOMMonitoringObject -id <insert_object_id> | fl
This will list out all of the extended properties, the Squared Up custom labelling does not require the [Class.Name] part of the variable. To use any extended properties you will have to check the ‘load extended properties’ box.