diff --git a/hyracks/hyracks-api/src/main/java/edu/uci/ics/hyracks/api/job/JobSpecification.java b/hyracks/hyracks-api/src/main/java/edu/uci/ics/hyracks/api/job/JobSpecification.java
index f0e8510..a0d07a4 100644
--- a/hyracks/hyracks-api/src/main/java/edu/uci/ics/hyracks/api/job/JobSpecification.java
+++ b/hyracks/hyracks-api/src/main/java/edu/uci/ics/hyracks/api/job/JobSpecification.java
@@ -18,6 +18,7 @@
 import java.util.ArrayList;
 import java.util.HashMap;
 import java.util.HashSet;
+import java.util.Iterator;
 import java.util.List;
 import java.util.Map;
 import java.util.Set;
@@ -28,6 +29,8 @@
 import org.json.JSONObject;
 
 import edu.uci.ics.hyracks.api.constraints.Constraint;
+import edu.uci.ics.hyracks.api.constraints.expressions.PartitionCountExpression;
+import edu.uci.ics.hyracks.api.constraints.expressions.PartitionLocationExpression;
 import edu.uci.ics.hyracks.api.dataflow.ConnectorDescriptorId;
 import edu.uci.ics.hyracks.api.dataflow.IConnectorDescriptor;
 import edu.uci.ics.hyracks.api.dataflow.IOperatorDescriptor;
@@ -38,7 +41,7 @@
 
 public class JobSpecification implements Serializable, IOperatorDescriptorRegistry, IConnectorDescriptorRegistry {
     private static final long serialVersionUID = 1L;
-    
+
     private static final int DEFAULT_FRAME_SIZE = 32768;
 
     private final List<OperatorDescriptorId> roots;
@@ -80,7 +83,7 @@
     public JobSpecification() {
         this(DEFAULT_FRAME_SIZE);
     }
-    
+
     public JobSpecification(int frameSize) {
         roots = new ArrayList<OperatorDescriptorId>();
         resultSetIds = new ArrayList<ResultSetId>();
@@ -322,12 +325,39 @@
         return buffer.toString();
     }
 
+    @SuppressWarnings("incomplete-switch")
     public JSONObject toJSON() throws JSONException {
         JSONObject jjob = new JSONObject();
 
         JSONArray jopArray = new JSONArray();
         for (Map.Entry<OperatorDescriptorId, IOperatorDescriptor> e : opMap.entrySet()) {
-            jopArray.put(e.getValue().toJSON());
+            JSONObject op = e.getValue().toJSON();
+            if (!userConstraints.isEmpty()) {
+                // Add operator partition constraints to each JSON operator.
+                JSONObject pleObject = new JSONObject();
+                Iterator<Constraint> test = userConstraints.iterator();
+                while (test.hasNext()) {
+                    Constraint constraint = test.next();
+                    switch (constraint.getLValue().getTag()) {
+                        case PARTITION_COUNT:
+                            PartitionCountExpression pce = (PartitionCountExpression) constraint.getLValue();
+                            if (e.getKey() == pce.getOperatorDescriptorId()) {
+                                op.put("partition-count", constraint.getRValue().toString());
+                            }
+                            break;
+                        case PARTITION_LOCATION:
+                            PartitionLocationExpression ple = (PartitionLocationExpression) constraint.getLValue();
+                            if (e.getKey() == ple.getOperatorDescriptorId()) {
+                                pleObject.put(Integer.toString(ple.getPartition()), constraint.getRValue().toString());
+                            }
+                            break;
+                    }
+                }
+                if (pleObject.length() > 0) {
+                    op.put("partition-location", pleObject);
+                }
+            }
+            jopArray.put(op);
         }
         jjob.put("operators", jopArray);
 
