}
private Employee parseEmployee() throws Exception {
accept(JsonToken.START_OBJECT);
Employee emp = new Employee();
for (;;) {
JsonToken tok = parser.getCurrentToken();
if (tok == JsonToken.END_OBJECT) {
break;
}
if (tok == JsonToken.FIELD_NAME) {
String name = parser.getCurrentName();
tok = parser.nextToken();
if ("name" == name) {
emp.setName(acceptString(tok));
} else if ("description" == name) {
emp.setDescription(acceptString(tok));
} else if ("number" == name) {
emp.setNumber(acceptString(tok));
} else if ("id" == name) {
emp.setId(acceptLong(tok));
} else if ("age" == name) {
emp.setAge(acceptInteger(tok));
} else if ("salary" == name) {
emp.setSalary(acceptBigDecimal(tok));
} else if ("birthdate" == name) {
emp.setBirthdate(new Date(acceptLong(tok)));
} else if ("badboy" == name) {
emp.setBadboy(acceptBoolean(tok));
} else {
throw new RuntimeException("not match property : " + name);
}
}
}