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