Skip to content

4.5.5 Deprecations and breaking changes

Julien Viet edited this page Mar 12, 2024 · 1 revision

Vert.x Core

Deprecate Buffer#toJson in favour of Buffer#toJsonValue

https://github.com/eclipse-vertx/vert.x/pull/5149

The Buffer toJson method is being renamed to JsonValue since toJson is actually used by data object as a convention to convert a data object to a json value. Actually toJson should return a base64 representation of the Buffer instead of parsing the content and provide an appropriate JSON value mapping.

// Before
Object value = buffer.toJson();

// After
Object value = buffer.toJsonValue();
Clone this wiki locally