Skip to content

Commit 8480893

Browse files
committed
serialisation control
1 parent 4d0321e commit 8480893

File tree

2 files changed

+11
-2
lines changed

2 files changed

+11
-2
lines changed

bugsnag/src/main/java/com/bugsnag/Report.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -122,8 +122,7 @@ public Map<String, String> getUser() {
122122
return diagnostics.user;
123123
}
124124

125-
@Expose
126-
@com.fasterxml.jackson.annotation.JsonProperty("metaData")
125+
@Expose("metaData")
127126
public Map<String, Object> getMetadata() {
128127
return new RedactedMap(diagnostics.metadata, Set.of(config.redactedKeys));
129128
}

bugsnag/src/main/java/com/bugsnag/serialization/Expose.java

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,19 @@
88
import java.lang.annotation.RetentionPolicy;
99
import java.lang.annotation.Target;
1010

11+
/**
12+
* Annotation to mark methods for JSON serialization.
13+
*/
1114
@Retention(RetentionPolicy.RUNTIME)
1215
@Target(ElementType.METHOD)
1316
@JacksonAnnotationsInside
1417
@JsonProperty
1518
public @interface Expose {
19+
/**
20+
* The name to use for the JSON property. If not specified, the property name
21+
* will be derived from the method name.
22+
*
23+
* @return the JSON property name
24+
*/
25+
String value() default "";
1626
}

0 commit comments

Comments
 (0)