Skip to content

Commit

Permalink
Fix breaking change by core refactor (#888) (#889)
Browse files Browse the repository at this point in the history
(cherry picked from commit d45eacf)

Signed-off-by: Hailong Cui <[email protected]>
Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
  • Loading branch information
1 parent 5fd32a8 commit 975f519
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,9 @@ fun contentParser(bytesReference: BytesReference): XContentParser {

/** Convert an object to maps and lists representation */
fun ToXContent.convertToMap(): Map<String, Any> {
val bytesReference = XContentHelper.toXContent(this, MediaType.fromMediaType(XContentType.JSON.mediaType()), ToXContent.EMPTY_PARAMS, false)
val bytesReference = org.opensearch.core.xcontent.XContentHelper.toXContent(
this, XContentType.JSON, ToXContent.EMPTY_PARAMS, false
)
return XContentHelper.convertToMap(bytesReference, false, XContentType.JSON as (MediaType)).v2()
}

Expand Down

0 comments on commit 975f519

Please sign in to comment.