Rev 1779 | Rev 1781 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 1779 | Rev 1780 | ||
---|---|---|---|
Line 2... | Line 2... | ||
2 | 2 | ||
3 | import com.owlike.genson.Genson; |
3 | import com.owlike.genson.Genson; |
4 | import org.json.JSONException; |
4 | import org.json.JSONException; |
5 | import org.json.JSONObject; |
5 | import org.json.JSONObject; |
6 | 6 | ||
7 | import java.io.IOException; |
- | |
8 | - | ||
9 | /** |
7 | /** |
10 | * Created by jorgemachado on 03/02/17. |
8 | * Created by jorgemachado on 03/02/17. |
11 | */ |
9 | */ |
12 | public class BpmnFlowComponentImpl extends BpmnFlowComponent |
10 | public class BpmnFlowComponentImpl extends BpmnFlowComponent |
13 | { |
11 | { |
14 | static Genson genson = new Genson.Builder() |
12 | static Genson genson = new Genson.Builder() |
15 | .include(BpmnFlowComponent.class) |
13 | .include(BpmnFlowComponent.class) |
16 | //exclude connector |
14 | //exclude connector |
17 | .create(); |
15 | .create(); |
18 | 16 | ||
19 | public JSONObject toJsonObject() throws 1.5.0/docs/api/java/io/IOException.html">IOException, JSONException |
17 | public JSONObject toJsonObject() throws JSONException |
20 | { |
18 | { |
21 | return new JSONObject(genson.serialize(this)); |
19 | return new JSONObject(genson.serialize(this)); |
22 | } |
20 | } |
23 | 21 | ||
24 | public 1.5.0/docs/api/java/lang/String.html">String toJson() throws 1.5.0/docs/api/java/io/IOException.html">IOException |
22 | public 1.5.0/docs/api/java/lang/String.html">String toJson() { |
25 | { |
- | |
26 | return genson.serialize(this); |
23 | return genson.serialize(this); |
27 | } |
24 | } |
28 | } |
25 | } |