Skip to content

Why my Qiniu SDK have no Json.class #240

@chenzhaoyan

Description

@chenzhaoyan

public String uploadTokenWithDeadline(String bucket, String key, long deadline, StringMap policy, boolean strict) {
// TODO UpHosts Global
String scope = bucket;
if (key != null) {
scope = bucket + ":" + key;
}
StringMap x = new StringMap();
copyPolicy(x, policy, strict);
x.put("scope", scope);
x.put("deadline", deadline);

    String s = Json.encode(x);
    return signWithData(StringUtils.utf8Bytes(s));
}

public String uploadTokenWithPolicy(Object obj) {
    String s = Json.encode(obj);
    return signWithData(StringUtils.utf8Bytes(s));
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions