-
-
Notifications
You must be signed in to change notification settings - Fork 706
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
Redesign JSON output, ditch jsono, offer variants controlled by parameter instead #122
Comments
For the overall shape of the rows:
For getting back extra keys:
For expanding columns:
Or The template view will only be allowed to work with data it can request using extra options. That leaves one sighted nasty edge-case: the default view will expand all columns, but the I think that's OK. The default view won't include the extras used by the template to render the page either. |
This calls for refactoring the code so the table view, the row view and the custom SQL view share as much logic as possible. |
To start with, I could just ditch the .jsono in favour of the new _shape argument. |
I think |
Now instead of this: /database/table.jsono We use the _shape parameter like this: /database/table.json?_shape=objects Also introduced a new _shape called 'object' which looks like this: /database/table.json?_shape=object Returning an object for the rows key: ... "rows": { "pk1": { ... }, "pk2": { ... } } Refs #122
New _shape= parameter replacing old .jsono extension Now instead of this: /database/table.jsono We use the _shape parameter like this: /database/table.json?_shape=objects Also introduced a new _shape called 'object' which looks like this: /database/table.json?_shape=object Returning an object for the rows key: ... "rows": { "pk1": { ... }, "pk2": { ... } } Refs #122
The new documentation for the |
I want to support three variants for the rows output:
I also want to make the various bits of metadata opt-in - so you don't get the SQL statement unless you ask for it.
These output options should be controlled by query string arguments.
I will set the .jsono URL to redirect to .json with the corresponding options.
The text was updated successfully, but these errors were encountered: