postMessage supports both json and string as input