Closed tingzhao closed 5 years ago
Is this keyvalue data type?
Yes.
Request: Allow clients to specify the return format to be either json
or tar
:
GET http://{server}/api/node/{uuid}/{instance}/batch?format=tar
Added GET /keyvalues
with optional ?jsontar=true
query string. Returning JSON is problematic due to the binary values. We'd have to agree on how to encode the values. Instead, I support either protobuf3 (similar to the POST /keyvalues
) or JSON array to specify keys of interest with a tarfile return (use jsontar
query string).
Returning JSON is problematic due to the binary values. We'd have to agree on how to encode the values.
If the user is requesting JSON results, couldn't you just assume that the values are JSON strings, parse them, and them load them into a JSON array? If any value turns out not to be JSON-parseable, you could return an error.
The API can take a json array of keys and return a json array of values in the same order.