shaoxikai
V2EX  ›  问与答

fastjson 中$ref 对象重复引用问题,使用下面的 SerializerFeature.DisableCircularReferenceDetect 出现异常

  •  
  •   shaoxikai · Apr 23, 2017 · 2743 views
    This topic created in 3333 days ago, the information mentioned may be changed or developed.

    我使用 public void writeJson(Object object) { try { String json = JSON.toJSONStringWithDateFormat(object, "yyyy-MM-dd HH:mm:ss",SerializerFeature.DisableCircularReferenceDetect); ServletActionContext.getResponse().setContentType( "text/html;charset=utf-8"); ServletActionContext.getResponse().getWriter().write(json); ServletActionContext.getResponse().getWriter().flush(); ServletActionContext.getResponse().getWriter().close(); } catch (IOException e) { e.printStackTrace(); } }

    No Comments Yet
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   5568 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 48ms · UTC 07:48 · PVG 15:48 · LAX 00:48 · JFK 03:48
    ♥ Do have faith in what you're doing.