程序包 cool.scx.mvc.vo

类 Json

java.lang.Object
cool.scx.mvc.vo.Json
所有已实现的接口:
ScxConsumer<io.vertx.ext.web.RoutingContext,Exception>, BaseVo

public final class Json extends Object implements BaseVo
Json 格式的返回值
版本:
0.3.6
作者:
scx567888
  • 方法详细资料

    • of

      public static Json of(Object data)
      a
      参数:
      data - a
      返回:
      a
    • accept

      public void accept(io.vertx.ext.web.RoutingContext context)

      sendToClient

      指定者:
      accept 在接口中 ScxConsumer<io.vertx.ext.web.RoutingContext,Exception>
    • toJson

      public String toJson() throws com.fasterxml.jackson.core.JsonProcessingException
      将内部的 JsonBody 转换为 json 字符串
      返回:
      r
      抛出:
      com.fasterxml.jackson.core.JsonProcessingException - 转换失败
    • toJson

      public String toJson(String defaultValue)
      a
      参数:
      defaultValue - a
      返回:
      a