Skip to content

Commit 6cb66c6

Browse files
authored
Merge pull request #166 from facebook/pjson-types
Add (id) casts to pjson
2 parents 93bfd0b + fb19972 commit 6cb66c6

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

commands/FBPrintCommands.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -476,8 +476,8 @@ def args(self):
476476
def run(self, arguments, options):
477477
objectToPrint = arguments[0]
478478
pretty = 1 if options.plain is None else 0
479-
jsonData = fb.evaluateObjectExpression('[NSJSONSerialization dataWithJSONObject:{} options:{} error:nil]'.format(objectToPrint, pretty))
480-
jsonString = fb.evaluateExpressionValue('(NSString*)[[NSString alloc] initWithData:{} encoding:4]'.format(jsonData)).GetObjectDescription()
479+
jsonData = fb.evaluateObjectExpression('[NSJSONSerialization dataWithJSONObject:(id){} options:{} error:nil]'.format(objectToPrint, pretty))
480+
jsonString = fb.evaluateExpressionValue('(NSString*)[[NSString alloc] initWithData:(id){} encoding:4]'.format(jsonData)).GetObjectDescription()
481481

482482
print jsonString
483483

0 commit comments

Comments
 (0)