rabin 8 년 전
부모
커밋
e029979f3c
1개의 변경된 파일9개의 추가작업 그리고 0개의 파일을 삭제
  1. 9 0
      core.py

+ 9 - 0
core.py

@@ -158,6 +158,15 @@ class Demeter(object):
 		fromtimestamp = getattr(datetime, 'fromtimestamp')
 		return str(fromtimestamp(value).strftime(string))
 
+	@staticmethod
+	def isJson(value):
+		result = False
+		try:
+			result = json.loads(value)
+		except ValueError:
+			return result
+		return result
+
 	@staticmethod
 	def error(string):
 		print string