static private boolean isFlat (JsonValue object) { for (JsonValue child = object.child; child != null; child = child.next) if (child.isObject() || child.isArray()) return false; return true; }
static private boolean isFlat (JsonValue object) { for (JsonValue child = object.child; child != null; child = child.next) if (child.isObject() || child.isArray()) return false; return true; }
private void addChild (String name, JsonValue child) { child.setName(name); if (current == null) { current = child; root = child; } else if (current.isArray() || current.isObject()) { child.parent = current; if (current.size == 0) current.child = child; else { JsonValue last = lastChild.pop(); last.next = child; child.prev = last; } lastChild.add(child); current.size++; } else root = current; }
private void addChild (String name, JsonValue child) { child.setName(name); if (current == null) { current = child; root = child; } else if (current.isArray() || current.isObject()) { child.parent = current; if (current.size == 0) current.child = child; else { JsonValue last = lastChild.pop(); last.next = child; child.prev = last; } lastChild.add(child); current.size++; } else root = current; }
writer.append('}'); } else if (object.isArray()) { if (object.child == null) writer.append("[]");
writer.append('}'); } else if (object.isArray()) { if (object.child == null) writer.append("[]");
if (jsonData.isArray()) {
if (jsonData.isArray()) {
value(child); pop(); } else if (value.isArray()) { if (value.name != null) array(value.name);
value(child); pop(); } else if (value.isArray()) { if (value.name != null) array(value.name);
if (keyframes != null && keyframes.isArray()) { for (JsonValue keyframe = keyframes.child; keyframe != null; keyframe = keyframe.next) { final float keytime = keyframe.getFloat("keytime", 0f) / 1000.f; if (translationKF != null && translationKF.isArray()) { nodeAnim.translation = new Array<ModelNodeKeyframe<Vector3>>(); nodeAnim.translation.ensureCapacity(translationKF.size); if (rotationKF != null && rotationKF.isArray()) { nodeAnim.rotation = new Array<ModelNodeKeyframe<Quaternion>>(); nodeAnim.rotation.ensureCapacity(rotationKF.size); if (scalingKF != null && scalingKF.isArray()) { nodeAnim.scaling = new Array<ModelNodeKeyframe<Vector3>>(); nodeAnim.scaling.ensureCapacity(scalingKF.size);
if (keyframes != null && keyframes.isArray()) { for (JsonValue keyframe = keyframes.child; keyframe != null; keyframe = keyframe.next) { final float keytime = keyframe.getFloat("keytime", 0f) / 1000.f; if (translationKF != null && translationKF.isArray()) { nodeAnim.translation = new Array<ModelNodeKeyframe<Vector3>>(); nodeAnim.translation.ensureCapacity(translationKF.size); if (rotationKF != null && rotationKF.isArray()) { nodeAnim.rotation = new Array<ModelNodeKeyframe<Quaternion>>(); nodeAnim.rotation.ensureCapacity(rotationKF.size); if (scalingKF != null && scalingKF.isArray()) { nodeAnim.scaling = new Array<ModelNodeKeyframe<Vector3>>(); nodeAnim.scaling.ensureCapacity(scalingKF.size);
} else if (object.isArray()) { if (object.child == null) buffer.append("[]");
} else if (object.isArray()) { if (object.child == null) buffer.append("[]");
buffer.append('}'); } else if (object.isArray()) { if (object.child == null) buffer.append("[]");
buffer.append('}'); } else if (object.isArray()) { if (object.child == null) buffer.append("[]");
static private boolean isFlat (JsonValue object) { for (JsonValue child = object.child; child != null; child = child.next) if (child.isObject() || child.isArray()) return false; return true; }
private int depth(JsonValue v) { if (v.isArray()) { return depth(v.child) + 1; } else { return 1; } }
public JsonValue get(String propName, String childId) { JsonValue json = props.get(propName); if(json.isArray()) for(JsonValue value : json) if(value.has("id") && value.getString("id").equals(childId)) return value; return null; } }
private void addChild (String name, JsonValue child) { child.setName(name); if (current == null) { current = child; root = child; } else if (current.isArray() || current.isObject()) { child.parent = current; if (current.size == 0) current.child = child; else { JsonValue last = lastChild.pop(); last.next = child; child.prev = last; } lastChild.add(child); current.size++; } else root = current; }