Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/ssh/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
在SSH中使用fastjson返回结果_Json_Ssh_Struts - Fatal编程技术网

在SSH中使用fastjson返回结果

在SSH中使用fastjson返回结果,json,ssh,struts,Json,Ssh,Struts,在ssh中,当我们想要返回json数据时,我们可以设置 在struts xml中 但当我的数据有时间戳值时,它会返回类似“2015-08-11T09:19:25Z”的结果; 然后我想使用fastjson来处理数据(还有一些其他原因),但我不知道如何将fastjson设置为ssh,以便可以从fastjson而不是json本身返回json 期待您的回答我们可以添加时间戳值的get方法 @JSON(format="yyyy-MM-dd HH:mm:ss") public Timestamp g

在ssh中,当我们想要返回json数据时,我们可以设置

在struts xml中

但当我的数据有时间戳值时,它会返回类似“2015-08-11T09:19:25Z”的结果; 然后我想使用fastjson来处理数据(还有一些其他原因),但我不知道如何将fastjson设置为ssh,以便可以从fastjson而不是json本身返回json


期待您的回答

我们可以添加时间戳值的get方法

 @JSON(format="yyyy-MM-dd HH:mm:ss")
  public Timestamp getTest(){
      return this.test;
 }