示例#1
0
    def from_json_text(cls, text, number=None, validate=True):
        """
        Create an incident from JSON text.

        @param text: JSON text describing an incident.
        @type text: L{unicode}

        @param number: The number of the incident.
            If C{number} is not C{None} and C{text} includes an incident number
            that is different than C{number}, raise an L{InvalidDataError}.
        @type number: L{int}

        @param validate: If true, raise L{InvalidDataError} is the data does
            not validate as a fully-well-formed incident.
        @type validate: L{bool}
        """
        root = from_json_text(text)
        return cls.from_json(root, number, validate)
示例#2
0
 def from_json_text(cls, text, number=None, validate=True):
     root = from_json_text(text)
     return cls.from_json(root, number, validate)
示例#3
0
def expressionFromJSONText(jsonText):
    json = from_json_text(jsonText)
    return expressionFromJSON(json)
示例#4
0
def expressionFromJSONText(jsonText):
    json = from_json_text(jsonText)
    return expressionFromJSON(json)