Search in sources :

Example 1 with Json

use of springfox.documentation.spring.web.json.Json in project fastjson by alibaba.

the class SwaggerJsonSerializer method write.

public //
void write(//
JSONSerializer serializer, Object object, Object fieldName, Type fieldType, int features) throws IOException {
    SerializeWriter out = serializer.getWriter();
    Json json = (Json) object;
    String value = json.value();
    out.write(value);
}
Also used : SerializeWriter(com.alibaba.fastjson.serializer.SerializeWriter) Json(springfox.documentation.spring.web.json.Json)

Example 2 with Json

use of springfox.documentation.spring.web.json.Json in project fastjson by alibaba.

the class JsonValueTest method test_0.

public void test_0() throws Exception {
    Json json = new Json("\"{\"id\":1001\"}");
    String text = JSON.toJSONString(json);
    Assert.assertEquals("\"{\"id\":1001\"}", text);
}
Also used : Json(springfox.documentation.spring.web.json.Json)

Aggregations

Json (springfox.documentation.spring.web.json.Json)2 SerializeWriter (com.alibaba.fastjson.serializer.SerializeWriter)1