mohsen1 / json-formatter

Angular directive for collapsible JSON in HTML
http://azimi.me/json-formatter/demo/demo.html
Other
372 stars 85 forks source link

Support property getter functions #40

Closed matthiasg closed 8 years ago

matthiasg commented 8 years ago

Any plans to also support property getters (similar to what dev tools in chrome do) or just enumerate them like normal properties

mohsen1 commented 8 years ago

Because invoking a getter function can potentially change state of the program and this module should not really do that, I don't know what's the right answer.

Maybe we render getter functions without their actual values?

matthiasg commented 8 years ago

@mohsen1 the perfect way would of course be to to it like chrome. just show them with some different styling and retrieve value on click.

but i would be happy even if it did potentially change the state, since getters shouldnt be implemented with bad side-effects anyway.

mohsen1 commented 8 years ago

I see. Makes sense. I will do it. Per #35 I want to use json-formatter-js internally in this module. I'm moving this to that repo.

mohsen1 commented 8 years ago

This issue was moved to mohsen1/json-formatter-js#8