Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove Deprecated @JsonAlias migrate to @Json.Alias, Remove newBuilder() migrate to builder() #191

Merged
merged 1 commit into from
Nov 30, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -74,10 +74,7 @@ private void initAliases(Element element) {
var alias =
AliasPrism.getOptionalOn(element)
.map(a -> Util.escapeQuotes(a.value()))
.orElse(
JsonAliasPrism.getOptionalOn(element)
.map(a -> Util.escapeQuotes(a.value()))
.orElse(Collections.emptyList()));
.orElse(Collections.emptyList());

aliases.addAll(alias);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
@GeneratePrism(value = io.avaje.jsonb.Json.Import.List.class, name = "ImportListPrism")
@GeneratePrism(io.avaje.jsonb.Json.Alias.class)
@GeneratePrism(io.avaje.jsonb.Json.Creator.class)
@GeneratePrism(io.avaje.jsonb.Json.JsonAlias.class)
@GeneratePrism(io.avaje.jsonb.Json.Ignore.class)
@GeneratePrism(io.avaje.jsonb.Json.Property.class)
@GeneratePrism(io.avaje.jsonb.Json.MixIn.class)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
package io.avaje.jsonb.generator.models.valid;

import io.avaje.jsonb.Json.JsonAlias;
import io.avaje.jsonb.Json;

public class Example2Packet extends Packet {

private final String ids;
@JsonAlias("long-ring-long-land")
@Json.Alias("long-ring-long-land")
private Long longy;

public Example2Packet(String ids, Long longy) {
Expand Down
12 changes: 0 additions & 12 deletions jsonb/src/main/java/io/avaje/jsonb/Json.java
Original file line number Diff line number Diff line change
Expand Up @@ -139,18 +139,6 @@
String[] value();
}

/**
* Deprecated - migrate to {@link Json.Alias}.
*/
@Deprecated
@Retention(CLASS)
@Target(FIELD)
@interface JsonAlias {

/** One or more secondary names to accept as aliases to the official name. */
String[] value();
}

/**
* Exclude the property from serialization, deserialization or both.
* <p>
Expand Down
8 changes: 0 additions & 8 deletions jsonb/src/main/java/io/avaje/jsonb/Jsonb.java
Original file line number Diff line number Diff line change
Expand Up @@ -109,14 +109,6 @@ static Builder builder() {
return DefaultBootstrap.builder();
}

/**
* Migrate to builder().
*/
@Deprecated
static Builder newBuilder() {
return builder();
}

/**
* Return json content for the given object.
* <p>
Expand Down