Skip to content

Commit

Permalink
Merge pull request #166 from facebook/pjson-types
Browse files Browse the repository at this point in the history
Add (id) casts to pjson
  • Loading branch information
kastiglione committed Jul 20, 2016
2 parents 93bfd0b + fb19972 commit 6cb66c6
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions commands/FBPrintCommands.py
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down

0 comments on commit 6cb66c6

Please sign in to comment.