Skip to content

Commit

Permalink
Fix breaking change by core refactor
Browse files Browse the repository at this point in the history
Signed-off-by: Hailong Cui <[email protected]>
  • Loading branch information
Hailong-am committed Aug 10, 2023
1 parent 53853bf commit adddb37
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,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 adddb37

Please sign in to comment.