All Downloads are FREE. Search and download functionalities are using the official Maven repository.

cn.schoolwow.util.module.query.resource.flow.ParseStringAsJSONArrayFlow Maven / Gradle / Ivy

The newest version!
package cn.schoolwow.util.module.query.resource.flow;

import cn.schoolwow.quickflow.domain.FlowContext;
import cn.schoolwow.quickflow.flow.BusinessFlow;
import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject;

public class ParseStringAsJSONArrayFlow implements BusinessFlow {
    @Override
    public void executeBusinessFlow(FlowContext flowContext) throws Exception {
        String content = (String) flowContext.checkData("content");

        JSONArray jsonArray = JSONObject.parseArray(content);
        flowContext.putReturnData("jsonArray", jsonArray);
    }

    @Override
    public String name() {
        return "将字符串转化为JSONArray对象";
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy