我想使用其中具有时间类型字段的邮递员发送JSON数据。发送时间类型数据的格式应该是什么?
我尝试用字符串给它,但是它不起作用。
{
"userName" : "bdsfksd",
"amount" : 456.165,
"status" : "dsfkndsl" ,
"time" : "10:50" ,
"date" : "1997-02-02"
}
我的课看起来像-
package com.sm.test.dto;
import java.sql.Date;
import java.sql.Time;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
@Entity
public class PickUp {
@Id
@GeneratedValue(strategy = GenerationType.AUTO)
private int requestId;
private String userName;
private double amount;
private String status;
private Time time;
private Date date;
}