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

Should the key override the Object? #42

Open
raykin opened this issue Dec 23, 2015 · 2 comments
Open

Should the key override the Object? #42

raykin opened this issue Dec 23, 2015 · 2 comments

Comments

@raykin
Copy link

raykin commented Dec 23, 2015

The code is

 json-formatter(key="::trace.defined_class" json="::trace.return_value"

The output is as screencast, so the 'Object' seems nonsense in this case.
I tried find a config to hide the 'Object' , but failed. The 'Object' is useful as placeholder when no key value and constructor name.

json-formatter

@mohsen1
Copy link
Owner

mohsen1 commented Dec 23, 2015

The key attribute is used internally for recursion. It doesn't expect user provide the key. Providing json should be enough.

@raykin
Copy link
Author

raykin commented Dec 24, 2015

got it, I saw the key is shared as json and open, so I expected it can be used as another feature.

My problem is I wanna give the json a title to replace the 'Object'. But I cant create constructors for the json because the json data is from ruby object.
In the previous case, the return value is json stringfy of ruby object and the defined class is its class.
How about add title attribute to make the display more meaningful in some case?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants