mirror of
https://github.com/graphql-python/graphene.git
synced 2025-02-22 22:52:58 +03:00
Fix JSONString
This commit is contained in:
parent
fb4077273d
commit
1d86d18cbf
|
@ -16,11 +16,11 @@ class JSONString(Scalar):
|
|||
@staticmethod
|
||||
def parse_literal(node):
|
||||
if isinstance(node, ast.StringValue):
|
||||
return json.dumps(node.value)
|
||||
return json.loads(node.value)
|
||||
|
||||
@staticmethod
|
||||
def parse_value(value):
|
||||
return json.dumps(value)
|
||||
return json.loads(value)
|
||||
|
||||
|
||||
class DateTime(Scalar):
|
||||
|
|
Loading…
Reference in New Issue
Block a user