-
Notifications
You must be signed in to change notification settings - Fork 2.2k
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
New field type: JSON #190
Comments
Would be nice if it would take dirty JSON and clean it up: input
output
Personally I get so tired of having to drop to the console or node.js paste in perfectly valid code and then use JSON.stringify(obj) to get out "Valid" JSON. |
Create new field type "code" #190 using code mirror.
or a tree editor: |
You can use "code" field. Sample:
If language is json or javascript, show lint validator. Supported languages:
|
problem with using "Types.Code" is that it will store the JSON as text. Meaning you will not be able to run queries against it. I really wish you can throw in raw objects. This is supported by mongodb, mongoose by default, why is this option not available? |
@uptownhr someone has to code it. There's probably no technical reason blocking this. |
I created a field type Types.Json that store in mongo a JSON in raw format. I commit two pull requests to branch 0.3.x and master. |
Hi I have published my npm package: It allows you to create custom field types, and copy your custom fieldTypes from a selected dir into the keystone's fields dir and registers it. |
We're closing all feature requests to keep the issue tracker unpolluted. From now on submit feature requests on productpains.com! |
This worked for me and allowed my to save an arbitrary object, only it's not visible in the Admin UI because it is unsupported. But you can query the fields just fine.
|
@mxstbr @JedWatson i have make a pull request on latest version base on . @jbalde |
since this has been around for 3 years, is there a suggested work around for existing data schema with Mixed types (responses from third parties etc) trying out keystone v5 and was hoping to hit the ground running with a light cms around my data
going with Text for now and hoping it renders ok in gets |
@victusfate |
Would store a JSON string in the database, and have a nice renderer / editor in the Admin UI.
Could use pretty-stringify for formatting the JSON, and Code Mirror for editing.
Would validate JSON on save.
The text was updated successfully, but these errors were encountered: