Index: references/src/main/java/geniusweb/references/Parameters.java
===================================================================
--- references/src/main/java/geniusweb/references/Parameters.java	(revision 8)
+++ references/src/main/java/geniusweb/references/Parameters.java	(revision 8)
@@ -0,0 +1,13 @@
+package geniusweb.references;
+
+import java.util.HashMap;
+
+/**
+ * init parameters for a party. Object must be either a HashMap, List, String or
+ * Number. Other objects may not deserialize properly. We never use blanket
+ * Object deserializers (enableDefaultTyping) because of security reasons.
+ *
+ */
+public class Parameters extends HashMap<String, Object> {
+
+}
Index: references/src/main/java/geniusweb/references/PartyWithParameters.java
===================================================================
--- references/src/main/java/geniusweb/references/PartyWithParameters.java	(revision 8)
+++ references/src/main/java/geniusweb/references/PartyWithParameters.java	(revision 8)
@@ -0,0 +1,72 @@
+package geniusweb.references;
+
+import com.fasterxml.jackson.annotation.JsonAutoDetect;
+import com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility;
+import com.fasterxml.jackson.annotation.JsonCreator;
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+/**
+ * Container holding a partyref with parameters
+ */
+@JsonAutoDetect(fieldVisibility = Visibility.ANY, getterVisibility = Visibility.NONE, setterVisibility = Visibility.NONE)
+public class PartyWithParameters {
+
+	private final PartyRef partyref;
+	private final Parameters parameters;
+
+	@JsonCreator
+	public PartyWithParameters(@JsonProperty("partyref") PartyRef partyref,
+			@JsonProperty("parameters") Parameters parameters) {
+		this.partyref = partyref;
+		this.parameters = parameters;
+	}
+
+	public PartyRef getPartyRef() {
+		return partyref;
+	}
+
+	public Parameters getParameters() {
+		return parameters;
+	}
+
+	@Override
+	public String toString() {
+		if (parameters.isEmpty())
+			return partyref.toString();
+		return partyref.toString() + parameters.toString();
+	}
+
+	@Override
+	public int hashCode() {
+		final int prime = 31;
+		int result = 1;
+		result = prime * result
+				+ ((parameters == null) ? 0 : parameters.hashCode());
+		result = prime * result
+				+ ((partyref == null) ? 0 : partyref.hashCode());
+		return result;
+	}
+
+	@Override
+	public boolean equals(Object obj) {
+		if (this == obj)
+			return true;
+		if (obj == null)
+			return false;
+		if (getClass() != obj.getClass())
+			return false;
+		PartyWithParameters other = (PartyWithParameters) obj;
+		if (parameters == null) {
+			if (other.parameters != null)
+				return false;
+		} else if (!parameters.equals(other.parameters))
+			return false;
+		if (partyref == null) {
+			if (other.partyref != null)
+				return false;
+		} else if (!partyref.equals(other.partyref))
+			return false;
+		return true;
+	}
+
+}
Index: references/src/main/java/geniusweb/references/PartyWithProfile.java
===================================================================
--- references/src/main/java/geniusweb/references/PartyWithProfile.java	(revision 1)
+++ references/src/main/java/geniusweb/references/PartyWithProfile.java	(revision 8)
@@ -8,9 +8,9 @@
 @JsonAutoDetect(fieldVisibility = Visibility.ANY, getterVisibility = Visibility.NONE, setterVisibility = Visibility.NONE)
 public class PartyWithProfile {
-	private final PartyRef party;
+	private final PartyWithParameters party;
 	private final ProfileRef profile;
 
 	@JsonCreator
-	public PartyWithProfile(@JsonProperty("party") PartyRef party,
+	public PartyWithProfile(@JsonProperty("party") PartyWithParameters party,
 			@JsonProperty("profile") ProfileRef profile) {
 		if (party == null || profile == null) {
@@ -22,5 +22,5 @@
 	}
 
-	public PartyRef getParty() {
+	public PartyWithParameters getParty() {
 		return party;
 
Index: references/src/test/java/geniusweb/references/PartiWithParamsTest.java
===================================================================
--- references/src/test/java/geniusweb/references/PartiWithParamsTest.java	(revision 8)
+++ references/src/test/java/geniusweb/references/PartiWithParamsTest.java	(revision 8)
@@ -0,0 +1,73 @@
+package geniusweb.references;
+
+import static org.junit.Assert.assertEquals;
+
+import java.io.IOException;
+import java.net.URI;
+import java.net.URISyntaxException;
+import java.util.Arrays;
+import java.util.List;
+
+import org.junit.Before;
+import org.junit.Test;
+
+import com.fasterxml.jackson.core.JsonParseException;
+import com.fasterxml.jackson.core.JsonProcessingException;
+import com.fasterxml.jackson.databind.JsonMappingException;
+import com.fasterxml.jackson.databind.ObjectMapper;
+
+import tudelft.utilities.junit.GeneralTests;
+
+public class PartiWithParamsTest extends GeneralTests<PartyWithParameters> {
+
+	private PartyRef party1, party2;
+	private Parameters param1, param2;
+	private PartyWithParameters party1param1, party1param1a;
+	private PartyWithParameters party1param2;
+	private final String serialized = "{\"partyref\":\"ws:party1\",\"parameters\":{\"a\":1}}";
+
+	@Before
+	public void before() throws URISyntaxException {
+		party1 = new PartyRef(new URI("ws:party1"));
+		party2 = new PartyRef(new URI("ws:party2"));
+		param1 = new Parameters();
+		param2 = new Parameters();
+		param2.put("a", 1);
+		party1param1 = new PartyWithParameters(party1, param1);
+		party1param1a = new PartyWithParameters(party1, param1);
+		party1param2 = new PartyWithParameters(party1, param2);
+	}
+
+	@Override
+	public List<List<PartyWithParameters>> getGeneralTestData() {
+		return Arrays.asList(
+				Arrays.asList(party1param1, party1param1a, party1param1a),
+				Arrays.asList(party1param2));
+	}
+
+	@Override
+	public List<String> getGeneralTestStrings() {
+		return Arrays.asList("PartyRef.ws:party1.",
+				"PartyRef.ws:party1.\\{a=1\\}");
+	}
+
+	@Test
+	public void testSerialize() throws JsonProcessingException {
+		ObjectMapper jackson = new ObjectMapper();
+
+		String json = jackson.writeValueAsString(party1param2);
+		System.out.println(json);
+		assertEquals(serialized, json);
+	}
+
+	@Test
+	public void testDeserialize()
+			throws JsonParseException, JsonMappingException, IOException {
+		ObjectMapper jackson = new ObjectMapper();
+		PartyWithParameters p = jackson.readValue(serialized,
+				PartyWithParameters.class);
+		System.out.println(p);
+		assertEquals(party1param2, p);
+	}
+
+}
Index: references/src/test/java/geniusweb/references/PartyWithProfileTest.java
===================================================================
--- references/src/test/java/geniusweb/references/PartyWithProfileTest.java	(revision 1)
+++ references/src/test/java/geniusweb/references/PartyWithProfileTest.java	(revision 8)
@@ -17,7 +17,4 @@
 import com.fasterxml.jackson.databind.ObjectMapper;
 
-import geniusweb.references.PartyRef;
-import geniusweb.references.PartyWithProfile;
-import geniusweb.references.ProfileRef;
 import tudelft.utilities.junit.GeneralTests;
 
@@ -26,6 +23,7 @@
 	private PartyRef party1, party1a, party2, party3;
 	private ProfileRef profile1, profile2;
-	private PartyWithProfile partyprof1, partyprof1a, partyprof2, partyprof3;
-	private final String serialized = "{\"party\":\"ws:party1\",\"profile\":\"ws:profile1\"}";
+	private PartyWithProfile partyprof1, partyprof1a, partyprof2, partyprof3,
+			partyprof4;
+	private final String serialized = "{\"party\":{\"partyref\":\"ws:party1\",\"parameters\":{}},\"profile\":\"ws:profile1\"}";
 
 	@Before
@@ -39,8 +37,20 @@
 		profile2 = new ProfileRef(new URI("ws:profile2"));
 
-		partyprof1 = new PartyWithProfile(party1, profile1);
-		partyprof1a = new PartyWithProfile(party1, profile1);
-		partyprof2 = new PartyWithProfile(party2, profile1);
-		partyprof3 = new PartyWithProfile(party1, profile2);
+		Parameters settings1 = new Parameters();
+		Parameters settings2 = new Parameters();
+		settings2.put("a", 1);
+
+		PartyWithParameters party1withparams1 = new PartyWithParameters(party1,
+				settings1);
+		PartyWithParameters party1withparams2 = new PartyWithParameters(party1,
+				settings2);
+		PartyWithParameters party2withparams1 = new PartyWithParameters(party2,
+				settings1);
+
+		partyprof1 = new PartyWithProfile(party1withparams1, profile1);
+		partyprof1a = new PartyWithProfile(party1withparams1, profile1);
+		partyprof2 = new PartyWithProfile(party2withparams1, profile1);
+		partyprof3 = new PartyWithProfile(party1withparams1, profile2);
+		partyprof4 = new PartyWithProfile(party1withparams2, profile1);
 
 	}
@@ -49,5 +59,6 @@
 	public List<List<PartyWithProfile>> getGeneralTestData() {
 		return Arrays.asList(Arrays.asList(partyprof1, partyprof1a),
-				Arrays.asList(partyprof2), Arrays.asList(partyprof3));
+				Arrays.asList(partyprof2), Arrays.asList(partyprof3),
+				Arrays.asList(partyprof4));
 	}
 
@@ -55,7 +66,8 @@
 	public List<String> getGeneralTestStrings() {
 		return Arrays.asList(
-				"PartyWithProfile.PartyRef.ws:party1.,ProfileRef.ws:profile1..",
-				"PartyWithProfile.PartyRef.ws:party2.,ProfileRef.ws:profile1..",
-				"PartyWithProfile.PartyRef.ws:party1.,ProfileRef.ws:profile2..");
+				"PartyWithProfile.PartyRef.ws:party1.,ProfileRef.ws:profile1.*",
+				"PartyWithProfile.PartyRef.ws:party2.,ProfileRef.ws:profile1.*",
+				"PartyWithProfile.PartyRef.ws:party1.,ProfileRef.ws:profile2.*",
+				"PartyWithProfile.PartyRef.ws:party1.\\{a=1\\},ProfileRef.ws:profile1.*");
 	}
 
@@ -66,5 +78,5 @@
 	@Test(expected = IllegalArgumentException.class)
 	public void nullTest() throws URISyntaxException {
-		new PartyWithProfile((PartyRef) null, (ProfileRef) null);
+		new PartyWithProfile((PartyWithParameters) null, (ProfileRef) null);
 	}
 
