float a = json.readValue("a", float.class, 1f, jsonData);
return new Color(r, g, b, a);
}
});
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();