I'm developing an application using node.js
+ express
which contains a structure allowing the user to subscribe to lists of items. Each list subscription involves options such as the minimum score for each item and the top N items in the list, and the subscriptions can be organized into numeric groupings which relate to a particular rank in the overall subscribed lists schema. Multiple subscriptions can be in a single rank, allowing for ties, while others may rank higher or lower.
My current issue is that I'm providing an interface for managing these list subscriptions and their options, and while I can think of a few UI possibilities I'm a little stumped about the best format for submitting the results back to my server.
Represented as JSON, this is what I would be working with:
[
[
{"list_id":1,"min_score":0,"limit":500}
],
[
{"list_id":12,"min_score":5,"limit":-1},
{"list_id":16,"min_score":5,"limit":-1}
],
[
{"list_id":2,"min_score":0,"limit":-1}
]
]
I'm tempted to simply encode that JSON and POST it as a single param, but that sounds a bit hack-ish. I'm trying to keep my API as open and consistent as possible to allow for other clients.