Line | |
---|
1 | package json.serializers; |
---|
2 | |
---|
3 | import com.ether.simulation.Simulation; |
---|
4 | import net.sf.json.JSONObject; |
---|
5 | import net.sf.json.JsonConfig; |
---|
6 | |
---|
7 | public class SimulationJsonSerializer |
---|
8 | extends AbstractJsonSerializer<Simulation> |
---|
9 | { |
---|
10 | public JSONObject process( final Simulation simulation, final JsonConfig jsonConfig ) |
---|
11 | { |
---|
12 | final JSONObject result = new JSONObject(); |
---|
13 | |
---|
14 | serialize( result, "id", simulation.getId(), jsonConfig ); |
---|
15 | serialize( result, "location", simulation.getLocation(), jsonConfig ); |
---|
16 | serialize( result, "xmlnsHeader", simulation.getXmlnsHeader(), jsonConfig ); |
---|
17 | serialize( result, "attributes", simulation.getAttribute(), jsonConfig ); |
---|
18 | |
---|
19 | return result; |
---|
20 | } |
---|
21 | } |
---|
Note: See
TracBrowser
for help on using the repository browser.