Examples of JsonPrimitive


Examples of com.google.gson.JsonPrimitive

    @Override
    JsonObject toJson() {
        JsonObject root = new JsonObject();

        addCommonFields(root);
        root.add("display", new JsonPrimitive("all"));

        return root;
    }
View Full Code Here

Examples of com.massivecraft.mcore.xlib.gson.JsonPrimitive

      }
    }

    private String keyToString(JsonElement keyElement) {
      if (keyElement.isJsonPrimitive()) {
        JsonPrimitive primitive = keyElement.getAsJsonPrimitive();
        if (primitive.isNumber()) {
          return String.valueOf(primitive.getAsNumber());
        } else if (primitive.isBoolean()) {
          return Boolean.toString(primitive.getAsBoolean());
        } else if (primitive.isString()) {
          return primitive.getAsString();
        } else {
          throw new AssertionError();
        }
      } else if (keyElement.isJsonNull()) {
        return "null";
View Full Code Here

Examples of net.minecraft.util.com.google.gson.JsonPrimitive

                if (jsonobject.has("color")) {
                    ChatModifier.a(chatmodifier, (EnumChatFormat) jsondeserializationcontext.deserialize(jsonobject.get("color"), EnumChatFormat.class));
                }

                JsonObject jsonobject1;
                JsonPrimitive jsonprimitive;

                if (jsonobject.has("clickEvent")) {
                    jsonobject1 = jsonobject.getAsJsonObject("clickEvent");
                    if (jsonobject1 != null) {
                        jsonprimitive = jsonobject1.getAsJsonPrimitive("action");
                        EnumClickAction enumclickaction = jsonprimitive == null ? null : EnumClickAction.a(jsonprimitive.getAsString());
                        JsonPrimitive jsonprimitive1 = jsonobject1.getAsJsonPrimitive("value");
                        String s = jsonprimitive1 == null ? null : jsonprimitive1.getAsString();

                        if (enumclickaction != null && s != null && enumclickaction.a()) {
                            ChatModifier.a(chatmodifier, new ChatClickable(enumclickaction, s));
                        }
                    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.