Back to index

enigmail  1.4.3
Public Member Functions | Public Attributes
writemozinfo.JsonValue Class Reference

List of all members.

Public Member Functions

def __init__
def __repr__

Public Attributes


Detailed Description

A class to serialize Python values into JSON-compatible representations.

Definition at line 67 of file

Constructor & Destructor Documentation

def writemozinfo.JsonValue.__init__ (   self,

Definition at line 71 of file

00072     def __init__(self, v):
00073         if v is not None and not (isinstance(v,str) or isinstance(v,bool) or isinstance(v,int)):
00074             raise Exception("Unhandled data type: %s" % type(v))
        self.v = v

Member Function Documentation

Definition at line 75 of file

00076     def __repr__(self):
00077         if self.v is None:
00078             return "null"
00079         if isinstance(self.v,bool):
00080             return str(self.v).lower()
00081         return repr(self.v)

Member Data Documentation

Definition at line 74 of file

The documentation for this class was generated from the following file: