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

New default result format for json #40

Closed
rufuspollock opened this issue Oct 28, 2011 · 1 comment
Closed

New default result format for json #40

rufuspollock opened this issue Oct 28, 2011 · 1 comment
Assignees
Milestone

Comments

@rufuspollock
Copy link
Member

There are issues with current default json result format (no way to get ordered columns, no way to add other things like count). Options for format:

  • { keys: [column_names], data: [ [...] ] } - jsontuples
  • [ { col: val, col: val, ... } ] - current default return .json
  • { keys: [columns], data: [ {col: val, col:val}, ... ] }

NB: both 1 and 3 would allow for other keys such as count (aka numFound, total_rows) (cd #29).

Going forward we should switch to option (3) and make that the default for .json. If other options are wanted we can open more tickets.

In addition it may be desirable to expand column info from just a name to include things like type e.g.:

  • columns: [ {name: ..., type: ..., ...} ]

Spec

Query result 
{
  fields: [ list of field items ],
  data: [ {field-name: value}, ... ]
  count: ...
}

field item:
{
    name: ...
    type: ...
}

Count field

References

@ghost ghost assigned kindly Oct 28, 2011
@kindly kindly closed this as completed Nov 3, 2011
@kindly
Copy link
Contributor

kindly commented Nov 3, 2011

This has been completed in commit #928ff02004420f431918d94d974f32efd2971384. We are not adding the type information yet to the field list as a little thinking about what theses should be should be done first.

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

No branches or pull requests

2 participants