Package com.badlogic.gdx.utils

Examples of com.badlogic.gdx.utils.Json.writeField()


      public void write (Json json, Skin skin, Class valueType) {
        json.writeObjectStart();
        json.writeValue("resources", skin.data.resources);
        for (Entry<Class, ObjectMap<String, Object>> entry : data.resources.entries())
          json.setSerializer(entry.key, new AliasSerializer(entry.value));
        json.writeField(skin, "styles");
        json.writeObjectEnd();
      }

      public Skin read (Json json, Object jsonData, Class ignored) {
        ObjectMap map = (ObjectMap)jsonData;
View Full Code Here


    });

    json.setSerializer(TintedNinePatch.class, new Serializer() {
      public void write (Json json, Object tintedPatch, Class valueType) {
        json.writeObjectStart();
        json.writeField(tintedPatch, "name");
        json.writeField(tintedPatch, "color");
        json.writeObjectEnd();
      }

      public Object read (Json json, Object jsonData, Class type) {
View Full Code Here

    json.setSerializer(TintedNinePatch.class, new Serializer() {
      public void write (Json json, Object tintedPatch, Class valueType) {
        json.writeObjectStart();
        json.writeField(tintedPatch, "name");
        json.writeField(tintedPatch, "color");
        json.writeObjectEnd();
      }

      public Object read (Json json, Object jsonData, Class type) {
        String name = json.readValue("name", String.class, jsonData);
View Full Code Here

      public void write (Json json, Skin skin, Class valueType) {
        json.writeObjectStart();
        json.writeValue("resources", skin.resources);
        for (Entry<Class, ObjectMap<String, Object>> entry : resources.entries())
          json.setSerializer(entry.key, new AliasWriter(entry.key));
        json.writeField(skin, "styles");
        json.writeObjectEnd();
      }

      public Skin read (Json json, Object jsonData, Class ignored) {
        ObjectMap map = (ObjectMap)jsonData;
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.