summaryrefslogtreecommitdiff
path: root/unrpyc
diff options
context:
space:
mode:
Diffstat (limited to 'unrpyc')
-rw-r--r--unrpyc/decompiler.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/unrpyc/decompiler.py b/unrpyc/decompiler.py
index 06e758c..d25fa21 100644
--- a/unrpyc/decompiler.py
+++ b/unrpyc/decompiler.py
@@ -289,13 +289,13 @@ class PrintRenPython(python_ast.NodeVisitor):
return self.quote(python_ast.dump(node))
def visit_Num(self, node):
- return str(node.n)
+ return json.dumps(node.n)
def visit_Name(self, node):
- return self.quote(node.id)
+ return json.dumps(node.id)
def visit_Str(self, node):
- return self.quote(escape_string(node.s))
+ return json.dumps(node.s)
def visit_keyword(self, node):
return self.visit(node.value)