Skip to content

Instantly share code, notes, and snippets.

@vastdevblog
Created March 12, 2012 14:36
Show Gist options
  • Save vastdevblog/2022351 to your computer and use it in GitHub Desktop.
Save vastdevblog/2022351 to your computer and use it in GitHub Desktop.
A very simple model for use by the ExampleServer
package com.vast.exmaple;
import org.codehaus.jackson.annotate.JsonPropertyOrder;
// Fix the order that properties are emitted when using
// jackson to serialize this to json.
@JsonPropertyOrder(alphabetic = true)
public class SimpleModel {
private String id;
private String name;
private String address;
public SimpleModel(String id, String name, String address) {
this.id = id;
this.name = name;
this.address = address;
}
public String getId() {
return id;
}
public String getName() {
return name;
}
public String getAddress() {
return address;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment