本文整理了Java中org.eclipse.ditto.json.JsonObject.setAll()
方法的一些代码示例,展示了JsonObject.setAll()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。JsonObject.setAll()
方法的具体详情如下:
包路径:org.eclipse.ditto.json.JsonObject
类名称:JsonObject
方法名:setAll
[英]Creates a new JSON object by setting the given JSON fields to this object. All previous fields with the same key are replaced.
[中]通过将给定的JSON字段设置为此对象来创建新的JSON对象。替换具有相同键的所有先前字段。
代码示例来源:origin: eclipse/ditto
@Override
public FeatureProperties setAll(final Iterable<JsonField> jsonFields) {
return determineResult(() -> wrapped.setAll(jsonFields));
}
代码示例来源:origin: org.eclipse.ditto/ditto-model-things
@Override
public FeatureProperties setAll(final Iterable<JsonField> jsonFields) {
return determineResult(() -> wrapped.setAll(jsonFields));
}
代码示例来源:origin: org.eclipse.ditto/ditto-model-things
@Override
public Attributes setAll(final Iterable<JsonField> jsonFields) {
return determineResult(() -> wrapped.setAll(jsonFields));
}
代码示例来源:origin: eclipse/ditto
@Override
public Attributes setAll(final Iterable<JsonField> jsonFields) {
return determineResult(() -> wrapped.setAll(jsonFields));
}
代码示例来源:origin: eclipse/ditto
/**
* A "payload" object was wrapping the events payload until the introduction of "cr-commands 1.0.0".
* This field has to be used as fallback for already persisted events with "things-model" < 3.0.0.
* Removing this workaround is possible if we are sure that no "old" events are ever loaded again!
*/
private JsonObject migratePayload(final JsonObject jsonObject) {
return jsonObject.getValue(PAYLOAD)
.filter(JsonValue::isObject)
.map(JsonValue::asObject)
.map(obj -> jsonObject.remove(PAYLOAD.getPointer()).setAll(obj))
.orElse(jsonObject);
}
代码示例来源:origin: org.eclipse.ditto/ditto-services-things-persistence
/**
* A "payload" object was wrapping the events payload until the introduction of "cr-commands 1.0.0".
* This field has to be used as fallback for already persisted events with "things-model" < 3.0.0.
* Removing this workaround is possible if we are sure that no "old" events are ever loaded again!
*/
private JsonObject migratePayload(final JsonObject jsonObject) {
return jsonObject.getValue(PAYLOAD)
.filter(JsonValue::isObject)
.map(JsonValue::asObject)
.map(obj -> jsonObject.remove(PAYLOAD.getPointer()).setAll(obj))
.orElse(jsonObject);
}
代码示例来源:origin: eclipse/ditto
/**
* A "payload" object was wrapping the events payload until the introduction of "cr-commands 1.0.0". This field has
* to be used as fallback for already persisted events with "things-model" < 3.0.0. Removing this workaround is
* possible if we are sure that no "old" events are ever loaded again!
*/
private static JsonObject migratePayload(final JsonObject jsonObject) {
return jsonObject.getValue(PAYLOAD)
.map(obj -> jsonObject.remove(PAYLOAD.getPointer()).setAll(obj))
.orElse(jsonObject);
}
代码示例来源:origin: org.eclipse.ditto/ditto-services-policies-persistence
/**
* A "payload" object was wrapping the events payload until the introduction of "cr-commands 1.0.0". This field has
* to be used as fallback for already persisted events with "things-model" < 3.0.0. Removing this workaround is
* possible if we are sure that no "old" events are ever loaded again!
*/
private static JsonObject migratePayload(final JsonObject jsonObject) {
return jsonObject.getValue(PAYLOAD)
.map(obj -> jsonObject.remove(PAYLOAD.getPointer()).setAll(obj))
.orElse(jsonObject);
}
代码示例来源:origin: org.eclipse.ditto/ditto-model-things
@Override
public Attributes setAll(final Iterable<JsonField> jsonFields) {
return ImmutableAttributes.of(JsonFactory.newObject().setAll(jsonFields));
}
代码示例来源:origin: eclipse/ditto
@Override
public Attributes setAll(final Iterable<JsonField> jsonFields) {
return ImmutableAttributes.of(JsonFactory.newObject().setAll(jsonFields));
}
内容来源于网络,如有侵权,请联系作者删除!