本文整理了Java中com.badlogic.gdx.utils.Json.writeObjectEnd()
方法的一些代码示例,展示了Json.writeObjectEnd()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Json.writeObjectEnd()
方法的具体详情如下:
包路径:com.badlogic.gdx.utils.Json
类名称:Json
方法名:writeObjectEnd
暂无
代码示例来源:origin: libgdx/libgdx
writeObjectStart(actualType, null);
writeValue("value", value);
writeObjectEnd();
return;
writeObjectStart(actualType, knownType);
((Serializable)value).write(this);
writeObjectEnd();
return;
writeValue(item, elementType, null);
writeArrayEnd();
writeObjectEnd();
} else {
writeArrayStart();
writeObjectEnd();
return;
writeObjectEnd();
return;
writeObjectEnd();
return;
writer.name("value");
writer.value(convertToString((Enum)value));
writeObjectEnd();
} else {
代码示例来源:origin: libgdx/libgdx
writeObjectStart(actualType, null);
writeValue("value", value);
writeObjectEnd();
return;
writeObjectStart(actualType, knownType);
((Serializable)value).write(this);
writeObjectEnd();
return;
writeValue(item, elementType, null);
writeArrayEnd();
writeObjectEnd();
} else {
writeArrayStart();
writeObjectEnd();
return;
writeObjectEnd();
return;
writeObjectEnd();
return;
writer.name("value");
writer.value(convertToString((Enum)value));
writeObjectEnd();
} else {
代码示例来源:origin: junkdog/artemis-odb
@Override
public void write(Json json, SaveFileFormat.ComponentIdentifiers ci, Class knownType) {
json.writeObjectStart();
for (Map.Entry<Class<? extends Component>, String> entry : ci.typeToName.entrySet()) {
json.writeValue(entry.getKey().getName(), entry.getValue());
}
json.writeObjectEnd();
}
代码示例来源:origin: junkdog/artemis-odb
@Override
public void write(Json json, ArchetypeMapper object, Class knownType) {
json.writeObjectStart();
for (Map.Entry<Integer, ArchetypeMapper.TransmuterEntry> entry : object.entrySet()) {
json.writeValue(entry.getKey().toString(), entry.getValue());
}
json.writeObjectEnd();
}
代码示例来源:origin: narfman0/GDXWorld
@Override
public void write(Json json) {
json.writeObjectStart("");
json.writeFields(this);
json.writeObjectEnd();
}
代码示例来源:origin: SquidPony/SquidLib
@Override
public void write(Json json, GreasedRegion object, Class knownType) {
if(object == null)
{
json.writeValue(null);
return;
}
json.writeObjectStart();
json.writeObjectStart("items", GreasedRegion.class, GreasedRegion.class);
json.writeValue("w", object.width);
json.writeValue("h", object.height);
json.writeValue("d", object.data);
json.writeObjectEnd();
json.writeObjectEnd();
}
代码示例来源:origin: org.mini2Dx/mini2Dx-core
private <T> void writeSerializedMap(Field field, SerializedMap map, Json json) throws SerializationException {
if (field != null) {
json.writeObjectStart(field.getName());
} else {
json.writeObjectStart();
}
for (Object key : map.keys()) {
writeObject(field, map.get(key), key.toString(), json);
}
json.writeObjectEnd();
}
代码示例来源:origin: crashinvaders/gdx-texture-packer-gui
@Override
public String serializeState() {
StringWriter buffer = new StringWriter();
try {
Json json = new Json();
json.setWriter(new JsonWriter(buffer));
json.writeObjectStart();
json.writeValue("level", level);
json.writeValue("iterations", iterations);
json.writeObjectEnd();
return buffer.toString();
} finally {
StreamUtils.closeQuietly(buffer);
}
}
代码示例来源:origin: crashinvaders/gdx-texture-packer-gui
@Override
public String serializeState() {
StringWriter buffer = new StringWriter();
try {
Json json = new Json();
json.setWriter(new JsonWriter(buffer));
json.writeObjectStart();
json.writeValue("level", level);
json.writeValue("removeGamma", removeGamma);
json.writeObjectEnd();
return buffer.toString();
} finally {
StreamUtils.closeQuietly(buffer);
}
}
代码示例来源:origin: SquidPony/SquidLib
@Override
public void write(Json json, Arrangement object, Class knownType) {
if(object == null)
{
json.writeValue(null);
return;
}
json.writeObjectStart();
json.writeValue("k", object.keysAsOrderedSet(), OrderedSet.class);
json.writeValue("f", object.f);
json.writeObjectEnd();
}
代码示例来源:origin: crashinvaders/gdx-texture-packer-gui
@Override
public String serializeState() {
StringWriter buffer = new StringWriter();
try {
Json json = new Json();
json.setWriter(new JsonWriter(buffer));
json.writeObjectStart();
json.writeValue("encoding", encoding.name());
json.writeValue("quality", quality);
json.writeObjectEnd();
return buffer.toString();
} finally {
StreamUtils.closeQuietly(buffer);
}
}
代码示例来源:origin: crashinvaders/gdx-texture-packer-gui
@Override
public String serializeState() {
StringWriter buffer = new StringWriter();
try {
Json json = new Json();
json.setWriter(new JsonWriter(buffer));
json.writeObjectStart();
json.writeValue("level", level);
json.writeValue("threshold", threshold);
json.writeValue("dithering", dithering);
json.writeObjectEnd();
return buffer.toString();
} finally {
StreamUtils.closeQuietly(buffer);
}
}
代码示例来源:origin: bladecoder/bladecoder-adventure-engine
@Override
public void write(Json json) {
SceneActorRef actorRef;
json.writeObjectStart("actors");
for (InteractiveActor a : actors) {
actorRef = new SceneActorRef(a.getInitScene(), a.getId());
json.writeValue(actorRef.toString(), a);
}
json.writeObjectEnd();
}
代码示例来源:origin: SquidPony/SquidLib
@Override
public void write(Json json, K2 object, Class knownType) {
if(object == null)
{
json.writeValue(null);
return;
}
json.writeObjectStart();
json.writeValue("a", object.getSetA(), SortedSet.class);
json.writeValue("b", object.getSetB(), SortedSet.class);
json.writeObjectEnd();
}
代码示例来源:origin: bladecoder/bladecoder-adventure-engine
@Override
public void write(Json json) {
SceneActorRef actorRef;
json.writeValue("visible", visible);
json.writeObjectStart("items");
for (SpriteActor a : items) {
actorRef = new SceneActorRef(a.getInitScene(), a.getId());
json.writeValue(actorRef.toString(), a);
}
json.writeObjectEnd();
}
代码示例来源:origin: SquidPony/SquidLib
@Override
public void write(Json json, StringStringMap object, Class knownType) {
if(object == null)
{
json.writeValue(null);
return;
}
json.writeObjectStart();
json.writeValue("k", object.keysAsOrderedSet(), OrderedSet.class, String.class);
json.writeValue("v", object.valuesAsList(), ArrayList.class, String.class);
json.writeValue("f", object.f);
json.writeObjectEnd();
}
代码示例来源:origin: crashinvaders/gdx-texture-packer-gui
@Override
public String serializeState() {
StringWriter buffer = new StringWriter();
try {
Json json = new Json();
json.setWriter(new JsonWriter(buffer));
json.writeObjectStart();
json.writeValue("format", format.name());
json.writeValue("encodingEtc1", encodingEtc1.name());
json.writeValue("encodingEtc2", encodingEtc2.name());
json.writeValue("zipping", zipping);
json.writeObjectEnd();
return buffer.toString();
} finally {
StreamUtils.closeQuietly(buffer);
}
}
代码示例来源:origin: crashinvaders/gdx-texture-packer-gui
@Override
public void write(Json json, ScaleFactorModel model, Class knownType) {
json.writeObjectStart();
json.writeValue("suffix", model.getSuffix());
json.writeValue("factor", model.getFactor());
json.writeValue("resampling", model.getResampling().name());
json.writeObjectEnd();
}
代码示例来源:origin: SquidPony/SquidLib
@Override
public void write(Json json, K2V1 object, Class knownType) {
if(object == null)
{
json.writeValue(null);
return;
}
json.writeObjectStart();
json.writeValue("a", object.getSetA(), SortedSet.class);
json.writeValue("b", object.getSetB(), SortedSet.class);
json.writeValue("q", object.getListQ(), ArrayList.class);
json.writeObjectEnd();
}
代码示例来源:origin: junkdog/artemis-odb
@Override
public void write(Json json, IntBag entities, Class knownType) {
recursionLevel++;
if (recursionLevel == 1) {
json.writeObjectStart();
for (int i = 0, s = entities.size(); s > i; i++) {
Entity e = world.getEntity(entities.get(i));
json.writeValue(Integer.toString(e.getId()), e);
}
json.writeObjectEnd();
} else {
json.writeArrayStart();
for (int i = 0, s = entities.size(); s > i; i++) {
json.writeValue(entities.get(i));
}
json.writeArrayEnd();
}
recursionLevel--;
}
内容来源于网络,如有侵权,请联系作者删除!