https://www.google.com/search?q=coldfusion+dump+object&tbm=i...
http://help.adobe.com/en_US/ColdFusion/9.0/CFMLRef/WSc3ff6d0...
21–30 of 71 posts
https://www.google.com/search?q=coldfusion+dump+object&tbm=i...
http://help.adobe.com/en_US/ColdFusion/9.0/CFMLRef/WSc3ff6d0...
This is awesome. It's funny, I didn't think it would be useful until I actually checked it out, because I personally find JSON to be fairly readable.
that's the reason for this lib.
thanks for the awesome part :D
This reminds me of ColdFusion's cfdump: https://www.google.com/search?q=coldfusion+dump+object&tbm=i... http://help.adobe.com/en_US/ColdFusion/9.0/CFMLRef/WSc3ff6d0...
I was looking this morning at a lib to do this and I couldn't find one, but at one stack overflow question someone posted a screenshot of the ColdFusion tool and I said "that's what I need" and then I decided to do it myself.
now someone mentions it here, full circle :D
I find the the input format much easier to mentally parse, and it's more compact too. Maybe I am not human.
happy programmers day! :)
- Remove quotes from strings. They're already formatted differently.
- Remove array indices.
- Unescape strings.
The context and formatting should still be enough for devs, but I can't imagine quotes or indices do anything for nontechnical people.
e.g. ["\"foo\"","bar"] translates to:
"foo"
bar
This is great! And nicely written--it would be very easy to modify this to format things differently. Eventually, it would be cool to have the conversion go both ways. That way it could be incorporated in a CMS (arbitrary structured content being passed around as JSON but displayed and edited in HTML).
since css classes tell you what's inside you can recover it completely, also I was thinking on using HTML5's data- to store the data there too. the next next step would be to provide in place edition with validation :)
Definitely! Take a look at http://createjs.org/--it will probably help (in fact, I've been using it for a different project and if I have time I might be submitting a pull request to you in the next week or so).
Pretty funny considering JSON is self described as "easy for humans to read and write." If your target is nontechnical folks, I wonder if it would be useful to go a step further and: - Remove quotes from strings. They're already formatted differently. - Remove array indices. - Unescape strings. The context and formatting should still be enough for devs, but I can't imagine quotes or indices do anything for nontechnic…
the array indices I was thinking on having it as an option, I would like 'something' to make them standout as lists even when no index is displayed, any idea?
will open issues for both:
author here: let me know if you have any questions
Great work! Would be nice to add an option to convert json key names to human-friendly names(passed as a separate key value array). So a key like full_name can appear as "Your Name:" to the end user.