Package io.jans.as.server.ssa.ws.rs
Class SsaJsonService
- java.lang.Object
-
- io.jans.as.server.ssa.ws.rs.SsaJsonService
-
@Named public class SsaJsonService extends java.lang.ObjectProvides json utilities for SSA
-
-
Constructor Summary
Constructors Constructor Description SsaJsonService()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description org.json.JSONArraygetJSONArray(java.util.List<io.jans.as.common.model.ssa.Ssa> ssaList)Convert to JSONArray from ssaList with structure SSA.org.json.JSONObjectgetJSONObject(java.lang.String jwt)Convert to JSON using jwt.java.lang.StringjsonArrayToString(org.json.JSONArray jsonArray)Convert to json string from jsonArray.java.lang.StringjsonObjectToString(org.json.JSONObject jsonObject)Convert to json string from jsonObject.
-
-
-
Method Detail
-
jsonObjectToString
public java.lang.String jsonObjectToString(org.json.JSONObject jsonObject) throws org.json.JSONExceptionConvert to json string from jsonObject.- Parameters:
jsonObject- Json object to convert- Returns:
- Json string
- Throws:
org.json.JSONException- If an error is found when converting.
-
jsonArrayToString
public java.lang.String jsonArrayToString(org.json.JSONArray jsonArray) throws org.json.JSONExceptionConvert to json string from jsonArray.- Parameters:
jsonArray- Json array to convert- Returns:
- Json string
- Throws:
org.json.JSONException- If an error is found when converting.
-
getJSONArray
public org.json.JSONArray getJSONArray(java.util.List<io.jans.as.common.model.ssa.Ssa> ssaList) throws org.json.JSONExceptionConvert to JSONArray from ssaList with structure SSA.Method generates the SSA structure to add them to a json array.
- Parameters:
ssaList- List of SSA- Returns:
- Json array
- Throws:
org.json.JSONException- If an error is found when converting.
-
getJSONObject
public org.json.JSONObject getJSONObject(java.lang.String jwt) throws org.json.JSONExceptionConvert to JSON using jwt.- Parameters:
jwt- json web token of SSA- Returns:
- Json object.
- Throws:
org.json.JSONException- If an error is found when converting.
-
-