Skip to content

Deserialization error using elasticsearchClient's node().info() interface #608

Closed
@gamelike

Description

@gamelike

Java API client version

8,8,1

Java version

Kotlin 1.8.22 Jvm 17

Elasticsearch Version

8.8.1

Problem description

When I'm using elasticsearchClient.nodes().info() interface, throw co.elastic.clients.json.UnexpectedJsonEventException

@RestController
class ElasticRest(
    private val elasticsearchClient: ElasticsearchClient,
) {
    @GetMapping("node/info")
    fun node(): MutableMap<String, NodeInfo>? {
        return elasticsearchClient.nodes().info().nodes()
    }
}

Unexpected JSON event 'START_ARRAY' instead of '[KEY_NAME, VALUE_STRING, VALUE_NUMBER, VALUE_TRUE, VALUE_FALSE]'

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions