From fb19972c38fa06fcbbf38b72f93d639415b4d628 Mon Sep 17 00:00:00 2001 From: Dave Lee Date: Fri, 15 Jul 2016 10:11:08 -0700 Subject: [PATCH] Add (id) casts to pjson close #165 --- commands/FBPrintCommands.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/commands/FBPrintCommands.py b/commands/FBPrintCommands.py index 3af3780..58ae418 100755 --- a/commands/FBPrintCommands.py +++ b/commands/FBPrintCommands.py @@ -476,8 +476,8 @@ def args(self): def run(self, arguments, options): objectToPrint = arguments[0] pretty = 1 if options.plain is None else 0 - jsonData = fb.evaluateObjectExpression('[NSJSONSerialization dataWithJSONObject:{} options:{} error:nil]'.format(objectToPrint, pretty)) - jsonString = fb.evaluateExpressionValue('(NSString*)[[NSString alloc] initWithData:{} encoding:4]'.format(jsonData)).GetObjectDescription() + jsonData = fb.evaluateObjectExpression('[NSJSONSerialization dataWithJSONObject:(id){} options:{} error:nil]'.format(objectToPrint, pretty)) + jsonString = fb.evaluateExpressionValue('(NSString*)[[NSString alloc] initWithData:(id){} encoding:4]'.format(jsonData)).GetObjectDescription() print jsonString