Example usage for com.google.gson JsonPrimitive JsonPrimitive

List of usage examples for com.google.gson JsonPrimitive JsonPrimitive

Introduction

In this page you can find the example usage for com.google.gson JsonPrimitive JsonPrimitive.

Prototype

public JsonPrimitive(Character c) 

Source Link

Document

Create a primitive containing a character.

Usage

From source file:arces.unibo.SEPA.commons.response.QueryResponse.java

License:Open Source License

public QueryResponse(JsonObject body) {
    super();//from  w ww  .j  a  v  a2  s  .  c o m

    if (body != null)
        json.add("body", body);
    json.add("code", new JsonPrimitive(200));
}

From source file:arces.unibo.SEPA.commons.response.RegistrationResponse.java

License:Open Source License

public RegistrationResponse(String client_id, String client_secret, JsonElement jwkPublicKey) {
    super();//from   w  w w  . j  a va2  s. co m
    json.add("client_id", new JsonPrimitive(client_id));
    json.add("client_secret", new JsonPrimitive(client_secret));
    json.add("signature", jwkPublicKey);
}

From source file:arces.unibo.SEPA.commons.response.SubscribeResponse.java

License:Open Source License

public SubscribeResponse(Integer token, String spuid) {
    super(token);

    if (spuid != null)
        json.add("subscribed", new JsonPrimitive(spuid));
}

From source file:arces.unibo.SEPA.commons.response.SubscribeResponse.java

License:Open Source License

public SubscribeResponse(Integer token, String spuid, String alias) {
    super(token);

    if (spuid != null)
        json.add("subscribed", new JsonPrimitive(spuid));
    if (alias != null)
        json.add("alias", new JsonPrimitive(alias));
}

From source file:arces.unibo.SEPA.commons.response.SubscribeResponse.java

License:Open Source License

public SubscribeResponse(String spuid) {
    super();

    if (spuid != null)
        json.add("subscribed", new JsonPrimitive(spuid));
}

From source file:arces.unibo.SEPA.commons.response.SubscribeResponse.java

License:Open Source License

public SubscribeResponse(String spuid, String alias) {
    super();/*  ww  w .  j  a v a2  s  .  com*/

    if (spuid != null)
        json.add("subscribed", new JsonPrimitive(spuid));
    if (alias != null)
        json.add("alias", new JsonPrimitive(alias));
}

From source file:arces.unibo.SEPA.commons.response.UnsubscribeResponse.java

License:Open Source License

public UnsubscribeResponse(Integer token, String spuid) {
    super(token);

    if (spuid != null)
        json.add("unsubscribed", new JsonPrimitive(spuid));
}

From source file:arces.unibo.SEPA.commons.response.UnsubscribeResponse.java

License:Open Source License

public UnsubscribeResponse(String spuid) {
    super();/*ww w.  j a  v a2 s  .c o  m*/

    if (spuid != null)
        json.add("unsubscribed", new JsonPrimitive(spuid));
}

From source file:arces.unibo.SEPA.commons.response.UpdateResponse.java

License:Open Source License

public UpdateResponse(Integer token, String body) {
    super(token);

    json.add("body", new JsonPrimitive(body));
    json.add("code", new JsonPrimitive(200));
}

From source file:arces.unibo.SEPA.commons.response.UpdateResponse.java

License:Open Source License

public UpdateResponse(String body) {
    super();//ww w . j  av a 2s.  com

    json.add("body", new JsonPrimitive(body));
    json.add("code", new JsonPrimitive(200));
}