0% found this document useful (0 votes)
95 views2 pages

Java JSON Example Class Definition

This Java class defines an Example object that can be serialized and deserialized from JSON. It contains properties for type, version, previousFullVersion, downloadLinks, and timestamp. Getter and setter methods are included for each property. Additional arbitrary properties are also supported through a Map.

Uploaded by

Apócrifos Team
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
95 views2 pages

Java JSON Example Class Definition

This Java class defines an Example object that can be serialized and deserialized from JSON. It contains properties for type, version, previousFullVersion, downloadLinks, and timestamp. Getter and setter methods are included for each property. Additional arbitrary properties are also supported through a Map.

Uploaded by

Apócrifos Team
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd

package com.

example;

import [Link];
import [Link];
import [Link];
import [Link];
import [Link];
import [Link];
import [Link];
import [Link];
import [Link];

@JsonInclude([Link].NON_NULL)
@JsonPropertyOrder({
"type",
"version",
"previousFullVersion",
"downloadLinks",
"timestamp"
})
public class Example {

@JsonProperty("type")
private String type;
@JsonProperty("version")
private String version;
@JsonProperty("previousFullVersion")
private String previousFullVersion;
@JsonProperty("downloadLinks")
private List<DownloadLink> downloadLinks = null;
@JsonProperty("timestamp")
private String timestamp;
@JsonIgnore
private Map<String, Object> additionalProperties = new HashMap<String,
Object>();

@JsonProperty("type")
public String getType() {
return type;
}

@JsonProperty("type")
public void setType(String type) {
[Link] = type;
}

@JsonProperty("version")
public String getVersion() {
return version;
}

@JsonProperty("version")
public void setVersion(String version) {
[Link] = version;
}

@JsonProperty("previousFullVersion")
public String getPreviousFullVersion() {
return previousFullVersion;
}

@JsonProperty("previousFullVersion")
public void setPreviousFullVersion(String previousFullVersion) {
[Link] = previousFullVersion;
}

@JsonProperty("downloadLinks")
public List<DownloadLink> getDownloadLinks() {
return downloadLinks;
}

@JsonProperty("downloadLinks")
public void setDownloadLinks(List<DownloadLink> downloadLinks) {
[Link] = downloadLinks;
}

@JsonProperty("timestamp")
public String getTimestamp() {
return timestamp;
}

@JsonProperty("timestamp")
public void setTimestamp(String timestamp) {
[Link] = timestamp;
}

@JsonAnyGetter
public Map<String, Object> getAdditionalProperties() {
return [Link];
}

@JsonAnySetter
public void setAdditionalProperty(String name, Object value) {
[Link](name, value);
}

You might also like