class ImmutableJsonObject extends AbstractJsonValue implements JsonObject {

    @Override
    public <T> JsonObject set(final JsonFieldDefinition<T> fieldDefinition, @Nullable final T value) {
        requireNonNull(fieldDefinition, "The JSON field definition to set the value for must not be null!");

        final JsonPointer pointer = fieldDefinition.getPointer();

        final JsonKey leafKey = pointer.getLeaf().orElseThrow(() -> {
            final String msgTemplate = "The pointer of the field definition <{0}> must not be empty!";
            return new IllegalArgumentException(MessageFormat.format(msgTemplate, fieldDefinition));
        });
        final JsonField field = JsonField.newInstance(leafKey, JsonValue.of(value), fieldDefinition);
        return setFieldInHierarchy(this, pointer, field);
    }

      ImmutableJsonObject(final SoftReferencedFieldMap theFieldMap);

}