com.hcl.voltmx.middleware.dataobject.ResultToJSON
instead.@Deprecated public final class ResultToJSON extends Object
ResultToJSON
Modifier and Type | Method and Description |
---|---|
static String |
convert(Result result)
Deprecated.
Converts the given
Result object to JSON string. |
static String |
convert(Result result,
DataControllerResponse dcresponse)
Deprecated.
Converts the given
Result object to JSON string. |
static org.json.JSONArray |
convertDataset(Dataset dataset)
Deprecated.
Converts the given
Dataset object to JSON array. |
static org.json.JSONObject |
convertRecord(Record record)
Deprecated.
Converts the given
Record object to JSON object. |
static String |
debugConvert(Result result)
Deprecated.
Converts the given
Result object to JSON string for
debugging/logging purpose. |
static boolean |
isDefaultParam(String paramName)
Deprecated.
This is to check the given param default param or custom param.
|
public static String convert(Result result) throws org.json.JSONException
Result
object to JSON string.result
- The result to convertorg.json.JSONException
- In case of any JSON formatting errorResult
,
convert(Result, DataControllerResponse)
public static String convert(Result result, DataControllerResponse dcresponse) throws org.json.JSONException
Result
object to JSON string. This additionally
also updates the response object based on the result to set the appropriate
"opstatus" and "errmsg" fields.result
- The result to convertdcresponse
- The response objectorg.json.JSONException
- In case of any JSON formatting errorResult
,
convert(Result)
public static org.json.JSONArray convertDataset(Dataset dataset) throws org.json.JSONException
Dataset
object to JSON array.dataset
- The dataset to convertorg.json.JSONException
- In case of any JSON formatting errorDataset
public static org.json.JSONObject convertRecord(Record record) throws org.json.JSONException
Record
object to JSON object.record
- The record to convertorg.json.JSONException
- In case of any JSON formatting errorRecord
public static String debugConvert(Result result) throws org.json.JSONException
Result
object to JSON string for
debugging/logging purpose. This will mask all the sensitive fields as
specified in the properties.result
- The result to convertorg.json.JSONException
- In case of any JSON formatting errorResult
,
convert(Result)
,
convert(Result, DataControllerResponse)
public static boolean isDefaultParam(String paramName)
paramName
- the param nameCopyright © 2019. All rights reserved.