Rev 1779 | Rev 1781 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
1654 | jmachado | 1 | package pt.estgp.estgweb.domain; |
2 | |||
1670 | jmachado | 3 | import com.owlike.genson.Genson; |
4 | import org.json.JSONException; |
||
5 | import org.json.JSONObject; |
||
6 | |||
1654 | jmachado | 7 | /** |
8 | * Created by jorgemachado on 03/02/17. |
||
9 | */ |
||
1670 | jmachado | 10 | public class BpmnFlowComponentImpl extends BpmnFlowComponent |
11 | { |
||
12 | static Genson genson = new Genson.Builder() |
||
13 | .include(BpmnFlowComponent.class) |
||
14 | //exclude connector |
||
15 | .create(); |
||
16 | |||
1780 | jmachado | 17 | public JSONObject toJsonObject() throws JSONException |
1670 | jmachado | 18 | { |
19 | return new JSONObject(genson.serialize(this)); |
||
20 | } |
||
21 | |||
1780 | jmachado | 22 | public 1.5.0/docs/api/java/lang/String.html">String toJson() { |
1670 | jmachado | 23 | return genson.serialize(this); |
24 | } |
||
1654 | jmachado | 25 | } |