Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add print JSON command. #111

Merged
merged 3 commits into from
Sep 12, 2015
Merged

Add print JSON command. #111

merged 3 commits into from
Sep 12, 2015

Conversation

alexch2000
Copy link
Contributor

Add ability to print JSON formatted NSDictionary and NSArray.
Adding to pasteboard will be added soon

NSDictionary* dictionary = @{@"Array" : @[@1, @"a", @2], @"Value" : @13, @"String" : @"String"};

Example
(lldb) pjson dictionary

{
  "Value" : 13,
  "String" : "String",
  "Array" : [
    1,
    "a",
    2
  ]
}

@facebook-github-bot
Copy link
Contributor

Thank you for your pull request and welcome to our community. We require contributors to sign our Contributor License Agreement, and we don't seem to have you on file. In order for us to review and merge your code, please sign up at https://code.facebook.com/cla - and if you have received this in error or have any questions, please drop us a line at cla@fb.com. Thanks!

@ilkera
Copy link

ilkera commented Sep 11, 2015

Thanks Alex for doing this. It will be so helpful!

@facebook-github-bot
Copy link
Contributor

Thank you for signing our Contributor License Agreement. We can now accept your code for this (and any) Facebook open source project. Thanks!

@VTopoliuk
Copy link

Hey @kastiglione, actually I would like to have this command without auto-copy to pboard feature. I will not be happy to know my pboard was overridden by any reason. Debugging is iterative process and pboard can contain some important address or string. What about leaving this command as is?

@kastiglione
Copy link
Contributor

@VTopoliuk there are other commands that overwrite the pasteboard, which I tend to think of as generally a good thing, but you make a good point. We should either add a global setting, so that users can control this. Alternatively we could add a flag to commands to allow people to enable/disable pasteboard functionality. I think a global setting is better than per-command, what do you think?

@VTopoliuk
Copy link

@kastiglione I'm totally agree with you. Making global settings will be nice feature, but have per-command support is good feature too. For example I'm not interested on copying result to pboard by default, but sometimes I can override it with flag. So having both features is even better =)
But what about merging this request as is for now? Looks like very nice feature.





Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A few extra blank lines here.

@kastiglione
Copy link
Contributor

@VTopoliuk Happy to merge this. @alexch2000 would you mind a small update to for the comments I left. They are minor, so if you're busy I'm ok to land as is.

@alexch2000
Copy link
Contributor Author

@kastiglione Sorry for delay. I have changed code.

@kastiglione
Copy link
Contributor

That's no delay!

thanks ✨

kastiglione added a commit that referenced this pull request Sep 12, 2015
@kastiglione kastiglione merged commit b0f477b into facebook:master Sep 12, 2015
@kastiglione kastiglione mentioned this pull request Sep 12, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants