AUR web interface

**This is the bug tracker for the AUR web interface.**

Use this tracker to report bugs or make feature requests regarding the behaviour or implementation of the AUR software.
Please read the Reporting Bug Guidelines before filing a new task.

- Please report bugs related to Arch Linux official packages here:
- Please report bugs for [community] packages here:
- For any packages in the AUR contact the maintainer or leave a comment on the package's detail page.

Source Code:

FS#40963 - "results" value type in JSON response isn't consistent

Attached to Project: AUR web interface
Opened by Dave Reisner (falconindy) - Tuesday, 24 June 2014, 15:42 GMT
Last edited by Lukas Fleischer (lfleischer) - Tuesday, 01 July 2014, 20:03 GMT
Task Type General Gripe
Category Backend
Status Closed
Assigned To Lukas Fleischer (lfleischer)
Architecture All
Severity Low
Priority Normal
Reported Version 3.1.0
Due in Version 3.2.0
Due Date Undecided
Percent Complete 100%
Votes 0
Private No


I noticed this a long time ago, but never brought it up. In retrospect, I wish I had thought of it when we were discussing changes for rpc v2. Maybe something to fix in v3... The problem is that depending on the value of "type" in the RPC response, the JSON type of the "results" key can vary:

here it's a string:
here it's a list of objects:
here it's an object:

From a client perspective, this kind of sucks. I realize that the value of "type" can be used to infer the JSON type of the results, but this is unnecessary since you can always provide a list of objects and resultcount. I'd suggest keeping the error reporting separate from the results. This even makes the "type" field unnecessary since you now have the same generic object structure for all request types.

See attached examples since flyspray eats whitespace.
This task depends upon

Closed by  Lukas Fleischer (lfleischer)
Tuesday, 01 July 2014, 20:03 GMT
Reason for closing:  Fixed
Additional comments about closing:  Fixed in 3.2.0. Please use v3 of the RPC API.
Comment by Lukas Fleischer (lfleischer) - Tuesday, 01 July 2014, 18:29 GMT
  • Field changed: Due in Version (Undecided → 3.2.0)
Fixed in RPC v3, see 65129ce (Make results consistent in RPC replies, 2014-06-25).