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

JSON pretty Stringify #156

Open
sivatumma opened this issue Feb 11, 2015 · 3 comments
Open

JSON pretty Stringify #156

sivatumma opened this issue Feb 11, 2015 · 3 comments

Comments

@sivatumma
Copy link

Request a JSON.stringify({},null,'\t') kind of output through this.
Which means the form created through our forms.create({}) should be displayed just like pretty json and on click on any form field, they must be editable.

@ljharb
Copy link
Collaborator

ljharb commented Feb 11, 2015

Can you elaborate? I have no idea what you're asking for here.

@sivatumma
Copy link
Author

Okay I will explain. (I hope I am in a right codebase).
Right now I observe that this json-to-html-form creation happens pretty well and we can have form handler on it. What I wish I could have in addition is imagine how a JSON.stringify({"key":"value"},null,'\t') will print a pretty formatted json. In the same way the form being output to html from this library be just like that with form elements placed inline. It will look like a JSON tree structure in HTML UI. I have tried doing forms.create(JSON.stringify({"key":"value"},null,'\t')) but failed as it is expecting perfect JSON there.

@ljharb
Copy link
Collaborator

ljharb commented Feb 11, 2015

This module isn't for JSON-to-form creation - it's for JS-to-form creation. There's no JSON anywhere - JSON is a string, and once it's parsed, it's not JSON anymore.

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

No branches or pull requests

2 participants