Example #1
0
 def toJson(self, obj):
     try:
         return JsonProcessor.dumps(obj)
     except JSONException, e:
         raise RestxException("Could not serialize data: " + e.getMessage())
Example #2
0
 def toJson(self, obj):
     try:
         return JsonProcessor.dumps(obj)
     except JSONException, e:
         raise RestxException("Could not serialize data: " + e.getMessage());
Example #3
0
 def fromJson(self, str):
     try:
         obj = JsonProcessor.loads(str)
     except JSONException, e:
         raise RestxException("Could not de-serialize data: " +
                              e.getMessage())
Example #4
0
 def fromJson(self, str):
     try:
         obj = JsonProcessor.loads(str)
     except JSONException, e:
         raise RestxException("Could not de-serialize data: " + e.getMessage());