summaryrefslogtreecommitdiffstats
path: root/cmso-robot/robot/locallibrary/cmsoUtils/JSONUtils.py
blob: 4daccb3721cb4812fa5e4d65a3a2ae515c1b328a (plain)
1
2
3
4
5
6
7
8
9
10
11
import json

class JSONUtils:
    """JSONUtils is common resource for simple json helper keywords."""
    
    
    def json_escape(self, jsonObject):
        jsonstr = json.dumps(jsonObject)
        outstr = jsonstr.replace('"', '\\"').replace('\n', '\\n')
        return  outstr