Package org.takes.rs
Class RsWithType.Json
- java.lang.Object
-
- org.takes.rs.RsWrap
-
- org.takes.rs.RsWithType.Json
-
- Enclosing class:
- RsWithType
public static final class RsWithType.Json extends RsWrap
Response decorator, with content type application/json.The class is immutable and thread-safe.
- Since:
- 0.30
-
-
Constructor Summary
Constructors Constructor Description Json(Response res)
Constructs aJSON
that will add application/json as the content type header to the response.Json(Response res, Charset charset)
Constructs aJSON
that will add application/json as the content type header to the response using the specified charset as charset parameter value.
-
-
-
Constructor Detail
-
Json
public Json(Response res)
Constructs aJSON
that will add application/json as the content type header to the response.- Parameters:
res
- Original response
-
-