def from_dict(document):
        """Create data type definition form Json-like object represenation.

        Parameters
        ----------
        document : dict
            Json-like object represenation

        Returns
        -------
        AttributeType
        """
        # Get the type name from the document
        type_name = document['name']
        if type_name == ATTR_TYPE_INT:
            return IntType()
        elif type_name == ATTR_TYPE_FLOAT:
            return FloatType()
        elif type_name == ATTR_TYPE_ENUM:
            return EnumType(document['values'])
        elif type_name == ATTR_TYPE_DICT:
            return DictType()
        elif type_name == ATTR_TYPE_LIST:
            return ListType()
        else:
            raise ValueError('invalid attribute type: ' + str(type_name))
Create data type definition form Json-like object represenation.

        Parameters
        ----------
        document : dict
            Json-like object represenation

        Returns
        -------
        AttributeType