Details
-
Type:
Bug
-
Status:
Resolved
-
Priority:
Minor
-
Resolution: Fixed
-
Affects Version/s: 2.8.0-dp, 2.8.0-dp2
-
Fix Version/s: None
-
Component/s: library
-
Security Level: Public
-
Labels:None
Description
The current API forces the user to quote and encode the values that they're passing as parameters to the view. This should be simpler for the user, but it is not.
For instance, if a user wanted the string asd"asd as their couch "key" start then they'd have to enter it "\"asd\"asd\"", which is a big burden on the developer.
For instance, if a user wanted the string asd"asd as their couch "key" start then they'd have to enter it "\"asd\"asd\"", which is a big burden on the developer.
private String getArg(String key, Object value) {
// Special case
if (key.equals(STARTKEYDOCID)) {
return key + "=" + value;
}
if (value instanceof Boolean) {
return key + "=" + ((Boolean) value).toString();
} else if (value instanceof Integer) {
return key + "=" + ((Integer) value).toString();
} else if (value instanceof Stale) {
return key + "=" + ((Stale) value).toString();
} else {
return key + "=\"" + value + "\"";
}
}