Show More
@@ -655,6 +655,7 b' class JSON(DisplayObject):' | |||||
655 | @data.setter |
|
655 | @data.setter | |
656 | def data(self, data): |
|
656 | def data(self, data): | |
657 | if isinstance(data, str): |
|
657 | if isinstance(data, str): | |
|
658 | if getattr(self, 'filename', None) is None: | |||
658 | warnings.warn("JSON expects JSONable dict or list, not JSON strings") |
|
659 | warnings.warn("JSON expects JSONable dict or list, not JSON strings") | |
659 | data = json.loads(data) |
|
660 | data = json.loads(data) | |
660 | self._data = data |
|
661 | self._data = data | |
@@ -757,6 +758,8 b' class GeoJSON(DisplayObject):' | |||||
757 | @data.setter |
|
758 | @data.setter | |
758 | def data(self, data): |
|
759 | def data(self, data): | |
759 | if isinstance(data, str): |
|
760 | if isinstance(data, str): | |
|
761 | if getattr(self, 'filename', None) is None: | |||
|
762 | warnings.warn("GeoJSON expects JSONable dict or list, not JSON strings") | |||
760 | data = json.loads(data) |
|
763 | data = json.loads(data) | |
761 | self._data = data |
|
764 | self._data = data | |
762 |
|
765 |
General Comments 0
You need to be logged in to leave comments.
Login now