diff --git a/src/main/java/org.onosproject.xran/codecs/api/ARFCNValue.java b/src/main/java/org.onosproject.xran/codecs/api/ARFCNValue.java
index cffdb07..acdd791 100644
--- a/src/main/java/org.onosproject.xran/codecs/api/ARFCNValue.java
+++ b/src/main/java/org.onosproject.xran/codecs/api/ARFCNValue.java
@@ -4,41 +4,40 @@
 
 package org.onosproject.xran.codecs.api;
 
-import org.openmuc.jasn1.ber.types.BerInteger;
+import org.onosproject.xran.codecs.ber.types.BerInteger;
 
 import java.math.BigInteger;
-import java.util.Arrays;
 
 
 public class ARFCNValue extends BerInteger {
 
-	private static final long serialVersionUID = 1L;
+    private static final long serialVersionUID = 1L;
 
-	public ARFCNValue() {
-	}
+    public ARFCNValue() {
+    }
 
-	public ARFCNValue(byte[] code) {
-		super(code);
-	}
+    public ARFCNValue(byte[] code) {
+        super(code);
+    }
 
-	public ARFCNValue(BigInteger value) {
-		super(value);
-	}
+    public ARFCNValue(BigInteger value) {
+        super(value);
+    }
 
-	public ARFCNValue(long value) {
-		super(value);
-	}
+    public ARFCNValue(long value) {
+        super(value);
+    }
 
-	@Override
-	public int hashCode() {
-		return value.intValue();
-	}
+    @Override
+    public int hashCode() {
+        return value.intValue();
+    }
 
-	@Override
-	public boolean equals(Object obj) {
-		if (obj instanceof ARFCNValue) {
-			return value.intValue() == ((ARFCNValue) obj).value.intValue();
-		}
-		return super.equals(obj);
-	}
+    @Override
+    public boolean equals(Object obj) {
+        if (obj instanceof ARFCNValue) {
+            return value.intValue() == ((ARFCNValue) obj).value.intValue();
+        }
+        return super.equals(obj);
+    }
 }
diff --git a/src/main/java/org.onosproject.xran/codecs/api/AdmEstCause.java b/src/main/java/org.onosproject.xran/codecs/api/AdmEstCause.java
index e344fc5..7d1ffcf 100644
--- a/src/main/java/org.onosproject.xran/codecs/api/AdmEstCause.java
+++ b/src/main/java/org.onosproject.xran/codecs/api/AdmEstCause.java
@@ -4,7 +4,7 @@
 
 package org.onosproject.xran.codecs.api;
 
-import org.openmuc.jasn1.ber.types.BerEnum;
+import org.onosproject.xran.codecs.ber.types.BerEnum;
 
 import java.math.BigInteger;
 
diff --git a/src/main/java/org.onosproject.xran/codecs/api/AdmEstResponse.java b/src/main/java/org.onosproject.xran/codecs/api/AdmEstResponse.java
index 388b64e..f594b70 100644
--- a/src/main/java/org.onosproject.xran/codecs/api/AdmEstResponse.java
+++ b/src/main/java/org.onosproject.xran/codecs/api/AdmEstResponse.java
@@ -13,9 +13,9 @@
 import java.io.UnsupportedEncodingException;
 import java.math.BigInteger;
 import java.io.Serializable;
-import org.openmuc.jasn1.ber.*;
-import org.openmuc.jasn1.ber.types.*;
-import org.openmuc.jasn1.ber.types.string.*;
+import org.onosproject.xran.codecs.ber.*;
+import org.onosproject.xran.codecs.ber.types.*;
+import org.onosproject.xran.codecs.ber.types.string.*;
 
 
 public class AdmEstResponse extends BerEnum {
diff --git a/src/main/java/org.onosproject.xran/codecs/api/AdmEstStatus.java b/src/main/java/org.onosproject.xran/codecs/api/AdmEstStatus.java
index 68680a6..039e5e3 100644
--- a/src/main/java/org.onosproject.xran/codecs/api/AdmEstStatus.java
+++ b/src/main/java/org.onosproject.xran/codecs/api/AdmEstStatus.java
@@ -13,9 +13,9 @@
 import java.io.UnsupportedEncodingException;
 import java.math.BigInteger;
 import java.io.Serializable;
-import org.openmuc.jasn1.ber.*;
-import org.openmuc.jasn1.ber.types.*;
-import org.openmuc.jasn1.ber.types.string.*;
+import org.onosproject.xran.codecs.ber.*;
+import org.onosproject.xran.codecs.ber.types.*;
+import org.onosproject.xran.codecs.ber.types.string.*;
 
 
 public class AdmEstStatus extends BerEnum {
diff --git a/src/main/java/org.onosproject.xran/codecs/api/BitRate.java b/src/main/java/org.onosproject.xran/codecs/api/BitRate.java
index 7b0b49d..9dd16ec 100644
--- a/src/main/java/org.onosproject.xran/codecs/api/BitRate.java
+++ b/src/main/java/org.onosproject.xran/codecs/api/BitRate.java
@@ -13,9 +13,9 @@
 import java.io.UnsupportedEncodingException;
 import java.math.BigInteger;
 import java.io.Serializable;
-import org.openmuc.jasn1.ber.*;
-import org.openmuc.jasn1.ber.types.*;
-import org.openmuc.jasn1.ber.types.string.*;
+import org.onosproject.xran.codecs.ber.*;
+import org.onosproject.xran.codecs.ber.types.*;
+import org.onosproject.xran.codecs.ber.types.string.*;
 
 
 public class BitRate extends BerInteger {
diff --git a/src/main/java/org.onosproject.xran/codecs/api/CACap.java b/src/main/java/org.onosproject.xran/codecs/api/CACap.java
index cd2ef5c..4642978 100644
--- a/src/main/java/org.onosproject.xran/codecs/api/CACap.java
+++ b/src/main/java/org.onosproject.xran/codecs/api/CACap.java
@@ -4,12 +4,13 @@
 
 package org.onosproject.xran.codecs.api;
 
-import org.openmuc.jasn1.ber.BerByteArrayOutputStream;
-import org.openmuc.jasn1.ber.BerLength;
-import org.openmuc.jasn1.ber.BerTag;
-import org.openmuc.jasn1.ber.types.BerBoolean;
-import org.openmuc.jasn1.ber.types.BerEnum;
-import org.openmuc.jasn1.ber.types.BerInteger;
+import com.fasterxml.jackson.annotation.JsonIgnore;
+import org.onosproject.xran.codecs.ber.BerByteArrayOutputStream;
+import org.onosproject.xran.codecs.ber.BerLength;
+import org.onosproject.xran.codecs.ber.BerTag;
+import org.onosproject.xran.codecs.ber.types.BerBoolean;
+import org.onosproject.xran.codecs.ber.types.BerEnum;
+import org.onosproject.xran.codecs.ber.types.BerInteger;
 
 import java.io.IOException;
 import java.io.InputStream;
@@ -22,6 +23,7 @@
 
 	public static final BerTag tag = new BerTag(BerTag.UNIVERSAL_CLASS, BerTag.CONSTRUCTED, 16);
 
+	@JsonIgnore
 	public byte[] code = null;
 	private BerInteger band = null;
 	private BerEnum caclassdl = null;
@@ -193,7 +195,7 @@
 			sb.append("\t");
 		}
 		if (band != null) {
-			sb.append("\"band\":").append(band);
+			sb.append("band:").append(band);
 		}
 		
 		sb.append(",\n");
@@ -201,7 +203,7 @@
 			sb.append("\t");
 		}
 		if (caclassdl != null) {
-			sb.append("\"caclassdl\":").append(caclassdl);
+			sb.append("caclassdl:").append(caclassdl);
 		}
 		
 		sb.append(",\n");
@@ -209,7 +211,7 @@
 			sb.append("\t");
 		}
 		if (caclassul != null) {
-			sb.append("\"caclassul\":").append(caclassul);
+			sb.append("caclassul:").append(caclassul);
 		}
 		
 		sb.append(",\n");
@@ -217,7 +219,7 @@
 			sb.append("\t");
 		}
 		if (crossCarrierSched != null) {
-			sb.append("\"crossCarrierSched\":").append(crossCarrierSched);
+			sb.append("crossCarrierSched:").append(crossCarrierSched);
 		}
 		
 		sb.append("\n");
diff --git a/src/main/java/org.onosproject.xran/codecs/api/CRNTI.java b/src/main/java/org.onosproject.xran/codecs/api/CRNTI.java
index 69d5f48..38f893b 100644
--- a/src/main/java/org.onosproject.xran/codecs/api/CRNTI.java
+++ b/src/main/java/org.onosproject.xran/codecs/api/CRNTI.java
@@ -14,9 +14,9 @@
 import java.io.UnsupportedEncodingException;
 import java.math.BigInteger;
 import java.io.Serializable;
-import org.openmuc.jasn1.ber.*;
-import org.openmuc.jasn1.ber.types.*;
-import org.openmuc.jasn1.ber.types.string.*;
+import org.onosproject.xran.codecs.ber.*;
+import org.onosproject.xran.codecs.ber.types.*;
+import org.onosproject.xran.codecs.ber.types.string.*;
 
 import javax.xml.bind.DatatypeConverter;
 
@@ -51,6 +51,6 @@
 
 	@Override
 	public String toString() {
-		return "\"" + DatatypeConverter.printHexBinary(value) + "\"";
+		return "" + DatatypeConverter.printHexBinary(value) + "";
 	}
 }
diff --git a/src/main/java/org.onosproject.xran/codecs/api/CandScell.java b/src/main/java/org.onosproject.xran/codecs/api/CandScell.java
index 7b954d0..2113691 100644
--- a/src/main/java/org.onosproject.xran/codecs/api/CandScell.java
+++ b/src/main/java/org.onosproject.xran/codecs/api/CandScell.java
@@ -4,9 +4,10 @@
 
 package org.onosproject.xran.codecs.api;
 
-import org.openmuc.jasn1.ber.BerByteArrayOutputStream;
-import org.openmuc.jasn1.ber.BerLength;
-import org.openmuc.jasn1.ber.BerTag;
+import com.fasterxml.jackson.annotation.JsonIgnore;
+import org.onosproject.xran.codecs.ber.BerByteArrayOutputStream;
+import org.onosproject.xran.codecs.ber.BerLength;
+import org.onosproject.xran.codecs.ber.BerTag;
 
 import java.io.IOException;
 import java.io.InputStream;
@@ -19,6 +20,7 @@
 
 	public static final BerTag tag = new BerTag(BerTag.UNIVERSAL_CLASS, BerTag.CONSTRUCTED, 16);
 
+	@JsonIgnore
 	public byte[] code = null;
 	private PhysCellId pci = null;
 	private ARFCNValue earfcnDl = null;
@@ -144,7 +146,7 @@
 			sb.append("\t");
 		}
 		if (pci != null) {
-			sb.append("\"pci\": ").append(pci);
+			sb.append("pci: ").append(pci);
 		}
 		
 		sb.append(",\n");
@@ -152,7 +154,7 @@
 			sb.append("\t");
 		}
 		if (earfcnDl != null) {
-			sb.append("\"earfcnDl\": ").append(earfcnDl);
+			sb.append("earfcnDl: ").append(earfcnDl);
 		}
 		sb.append("\n");
 		for (int i = 0; i < indentLevel; i++) {
diff --git a/src/main/java/org.onosproject.xran/codecs/api/DCCap.java b/src/main/java/org.onosproject.xran/codecs/api/DCCap.java
index f3f7c61..ea75cfb 100644
--- a/src/main/java/org.onosproject.xran/codecs/api/DCCap.java
+++ b/src/main/java/org.onosproject.xran/codecs/api/DCCap.java
@@ -4,10 +4,11 @@
 
 package org.onosproject.xran.codecs.api;
 
-import org.openmuc.jasn1.ber.BerByteArrayOutputStream;
-import org.openmuc.jasn1.ber.BerLength;
-import org.openmuc.jasn1.ber.BerTag;
-import org.openmuc.jasn1.ber.types.BerEnum;
+import com.fasterxml.jackson.annotation.JsonIgnore;
+import org.onosproject.xran.codecs.ber.BerByteArrayOutputStream;
+import org.onosproject.xran.codecs.ber.BerLength;
+import org.onosproject.xran.codecs.ber.BerTag;
+import org.onosproject.xran.codecs.ber.types.BerEnum;
 
 import java.io.IOException;
 import java.io.InputStream;
@@ -20,6 +21,7 @@
 
 	public static final BerTag tag = new BerTag(BerTag.UNIVERSAL_CLASS, BerTag.CONSTRUCTED, 16);
 
+	@JsonIgnore
 	public byte[] code = null;
 	private BerEnum drbTypeSplit = null;
 	
@@ -122,7 +124,7 @@
 			sb.append("\t");
 		}
 		if (drbTypeSplit != null) {
-			sb.append("\"drbTypeSplit\": ").append(drbTypeSplit);
+			sb.append("drbTypeSplit: ").append(drbTypeSplit);
 		}
 		
 		sb.append("\n");
diff --git a/src/main/java/org.onosproject.xran/codecs/api/DuplexMode.java b/src/main/java/org.onosproject.xran/codecs/api/DuplexMode.java
index cfbd191..ae2d40c 100644
--- a/src/main/java/org.onosproject.xran/codecs/api/DuplexMode.java
+++ b/src/main/java/org.onosproject.xran/codecs/api/DuplexMode.java
@@ -4,7 +4,7 @@
 
 package org.onosproject.xran.codecs.api;
 
-import org.openmuc.jasn1.ber.types.BerEnum;
+import org.onosproject.xran.codecs.ber.types.BerEnum;
 
 import java.math.BigInteger;
 
diff --git a/src/main/java/org.onosproject.xran/codecs/api/ECGI.java b/src/main/java/org.onosproject.xran/codecs/api/ECGI.java
index 01789f2..c903fd6 100644
--- a/src/main/java/org.onosproject.xran/codecs/api/ECGI.java
+++ b/src/main/java/org.onosproject.xran/codecs/api/ECGI.java
@@ -4,9 +4,10 @@
 
 package org.onosproject.xran.codecs.api;
 
-import org.openmuc.jasn1.ber.BerByteArrayOutputStream;
-import org.openmuc.jasn1.ber.BerLength;
-import org.openmuc.jasn1.ber.BerTag;
+import com.fasterxml.jackson.annotation.JsonIgnore;
+import org.onosproject.xran.codecs.ber.BerByteArrayOutputStream;
+import org.onosproject.xran.codecs.ber.BerLength;
+import org.onosproject.xran.codecs.ber.BerTag;
 
 import java.io.IOException;
 import java.io.InputStream;
@@ -19,6 +20,7 @@
 
 	public static final BerTag tag = new BerTag(BerTag.UNIVERSAL_CLASS, BerTag.CONSTRUCTED, 16);
 
+	@JsonIgnore
 	public byte[] code = null;
 	private PLMNIdentity pLMNIdentity = null;
 	private EUTRANCellIdentifier eUTRANcellIdentifier = null;
@@ -144,7 +146,7 @@
 			sb.append("\t");
 		}
 		if (pLMNIdentity != null) {
-			sb.append("\"pLMNIdentity\": ").append(pLMNIdentity);
+			sb.append("pLMNIdentity: ").append(pLMNIdentity);
 		}
 		
 		sb.append(",\n");
@@ -152,7 +154,7 @@
 			sb.append("\t");
 		}
 		if (eUTRANcellIdentifier != null) {
-			sb.append("\"eUTRANcellIdentifier\": ").append(eUTRANcellIdentifier);
+			sb.append("eUTRANcellIdentifier: ").append(eUTRANcellIdentifier);
 		}
 		
 		sb.append("\n");
diff --git a/src/main/java/org.onosproject.xran/codecs/api/ENBUES1APID.java b/src/main/java/org.onosproject.xran/codecs/api/ENBUES1APID.java
index 2bb7c15..61a9aba 100644
--- a/src/main/java/org.onosproject.xran/codecs/api/ENBUES1APID.java
+++ b/src/main/java/org.onosproject.xran/codecs/api/ENBUES1APID.java
@@ -13,9 +13,9 @@
 import java.io.UnsupportedEncodingException;
 import java.math.BigInteger;
 import java.io.Serializable;
-import org.openmuc.jasn1.ber.*;
-import org.openmuc.jasn1.ber.types.*;
-import org.openmuc.jasn1.ber.types.string.*;
+import org.onosproject.xran.codecs.ber.*;
+import org.onosproject.xran.codecs.ber.types.*;
+import org.onosproject.xran.codecs.ber.types.string.*;
 
 
 public class ENBUES1APID extends BerInteger {
diff --git a/src/main/java/org.onosproject.xran/codecs/api/ERABDecision.java b/src/main/java/org.onosproject.xran/codecs/api/ERABDecision.java
index 7d50dc7..fb70c38 100644
--- a/src/main/java/org.onosproject.xran/codecs/api/ERABDecision.java
+++ b/src/main/java/org.onosproject.xran/codecs/api/ERABDecision.java
@@ -13,9 +13,9 @@
 import java.io.UnsupportedEncodingException;
 import java.math.BigInteger;
 import java.io.Serializable;
-import org.openmuc.jasn1.ber.*;
-import org.openmuc.jasn1.ber.types.*;
-import org.openmuc.jasn1.ber.types.string.*;
+import org.onosproject.xran.codecs.ber.*;
+import org.onosproject.xran.codecs.ber.types.*;
+import org.onosproject.xran.codecs.ber.types.string.*;
 
 
 public class ERABDecision extends BerEnum {
diff --git a/src/main/java/org.onosproject.xran/codecs/api/ERABDirection.java b/src/main/java/org.onosproject.xran/codecs/api/ERABDirection.java
index d29502c..332953a 100644
--- a/src/main/java/org.onosproject.xran/codecs/api/ERABDirection.java
+++ b/src/main/java/org.onosproject.xran/codecs/api/ERABDirection.java
@@ -13,9 +13,9 @@
 import java.io.UnsupportedEncodingException;
 import java.math.BigInteger;
 import java.io.Serializable;
-import org.openmuc.jasn1.ber.*;
-import org.openmuc.jasn1.ber.types.*;
-import org.openmuc.jasn1.ber.types.string.*;
+import org.onosproject.xran.codecs.ber.*;
+import org.onosproject.xran.codecs.ber.types.*;
+import org.onosproject.xran.codecs.ber.types.string.*;
 
 
 public class ERABDirection extends BerEnum {
diff --git a/src/main/java/org.onosproject.xran/codecs/api/ERABID.java b/src/main/java/org.onosproject.xran/codecs/api/ERABID.java
index 92875c8..907243a 100644
--- a/src/main/java/org.onosproject.xran/codecs/api/ERABID.java
+++ b/src/main/java/org.onosproject.xran/codecs/api/ERABID.java
@@ -13,9 +13,9 @@
 import java.io.UnsupportedEncodingException;
 import java.math.BigInteger;
 import java.io.Serializable;
-import org.openmuc.jasn1.ber.*;
-import org.openmuc.jasn1.ber.types.*;
-import org.openmuc.jasn1.ber.types.string.*;
+import org.onosproject.xran.codecs.ber.*;
+import org.onosproject.xran.codecs.ber.types.*;
+import org.onosproject.xran.codecs.ber.types.string.*;
 
 
 public class ERABID extends BerInteger {
diff --git a/src/main/java/org.onosproject.xran/codecs/api/ERABParams.java b/src/main/java/org.onosproject.xran/codecs/api/ERABParams.java
index 237c5d9..fafd02d 100644
--- a/src/main/java/org.onosproject.xran/codecs/api/ERABParams.java
+++ b/src/main/java/org.onosproject.xran/codecs/api/ERABParams.java
@@ -13,9 +13,12 @@
 import java.io.UnsupportedEncodingException;
 import java.math.BigInteger;
 import java.io.Serializable;
-import org.openmuc.jasn1.ber.*;
-import org.openmuc.jasn1.ber.types.*;
-import org.openmuc.jasn1.ber.types.string.*;
+
+import com.fasterxml.jackson.annotation.JsonIgnore;
+import com.fasterxml.jackson.annotation.JsonValue;
+import org.onosproject.xran.codecs.ber.*;
+import org.onosproject.xran.codecs.ber.types.*;
+import org.onosproject.xran.codecs.ber.types.string.*;
 
 
 public class ERABParams implements Serializable {
@@ -23,6 +26,7 @@
 	private static final long serialVersionUID = 1L;
 
 	public static final BerTag tag = new BerTag(BerTag.UNIVERSAL_CLASS, BerTag.CONSTRUCTED, 16);
+	@JsonIgnore
 	public byte[] code = null;
 	private List<ERABParamsItem> seqOf = null;
 
@@ -34,6 +38,7 @@
 		this.code = code;
 	}
 
+	@JsonValue
 	public List<ERABParamsItem> getERABParamsItem() {
 		if (seqOf == null) {
 			seqOf = new ArrayList<ERABParamsItem>();
diff --git a/src/main/java/org.onosproject.xran/codecs/api/ERABParamsItem.java b/src/main/java/org.onosproject.xran/codecs/api/ERABParamsItem.java
index 9db7698..d36acb0 100644
--- a/src/main/java/org.onosproject.xran/codecs/api/ERABParamsItem.java
+++ b/src/main/java/org.onosproject.xran/codecs/api/ERABParamsItem.java
@@ -13,9 +13,11 @@
 import java.io.UnsupportedEncodingException;
 import java.math.BigInteger;
 import java.io.Serializable;
-import org.openmuc.jasn1.ber.*;
-import org.openmuc.jasn1.ber.types.*;
-import org.openmuc.jasn1.ber.types.string.*;
+
+import com.fasterxml.jackson.annotation.JsonIgnore;
+import org.onosproject.xran.codecs.ber.*;
+import org.onosproject.xran.codecs.ber.types.*;
+import org.onosproject.xran.codecs.ber.types.string.*;
 
 
 public class ERABParamsItem implements Serializable {
@@ -24,6 +26,7 @@
 
 	public static final BerTag tag = new BerTag(BerTag.UNIVERSAL_CLASS, BerTag.CONSTRUCTED, 16);
 
+	@JsonIgnore
 	public byte[] code = null;
 	private ERABID id = null;
 	private ERABDirection direction = null;
@@ -310,21 +313,21 @@
 			sb.append("\t");
 		}
 		if (id != null) {
-			sb.append("\"id\": ").append(id);
+			sb.append("id: ").append(id);
 		}
 		sb.append(",\n");
 		for (int i = 0; i < indentLevel + 1; i++) {
 			sb.append("\t");
 		}
 		if (direction != null) {
-			sb.append("\"direction\": ").append(direction);
+			sb.append("direction: ").append(direction);
 		}
 		sb.append(",\n");
 		for (int i = 0; i < indentLevel + 1; i++) {
 			sb.append("\t");
 		}
 		if (type != null) {
-			sb.append("\"type\": ").append(type);
+			sb.append("type: ").append(type);
 		}
 		
 		sb.append(",\n");
@@ -332,7 +335,7 @@
 			sb.append("\t");
 		}
 		if (qci != null) {
-			sb.append("\"qci\": ").append(qci);
+			sb.append("qci: ").append(qci);
 		}
 		
 		sb.append(",\n");
@@ -340,7 +343,7 @@
 			sb.append("\t");
 		}
 		if (arp != null) {
-			sb.append("\"arp\": ").append(arp);
+			sb.append("arp: ").append(arp);
 		}
 		
 		sb.append(",\n");
@@ -348,7 +351,7 @@
 			sb.append("\t");
 		}
 		if (gbrDl != null) {
-			sb.append("\"gbrDl\": ").append(gbrDl);
+			sb.append("gbrDl: ").append(gbrDl);
 		}
 		
 		sb.append(",\n");
@@ -356,7 +359,7 @@
 			sb.append("\t");
 		}
 		if (gbrUl != null) {
-			sb.append("\"gbrUl\": ").append(gbrUl);
+			sb.append("gbrUl: ").append(gbrUl);
 		}
 		
 		sb.append(",\n");
@@ -364,7 +367,7 @@
 			sb.append("\t");
 		}
 		if (mbrDl != null) {
-			sb.append("\"mbrDl\": ").append(mbrDl);
+			sb.append("mbrDl: ").append(mbrDl);
 		}
 		
 		sb.append(",\n");
@@ -372,7 +375,7 @@
 			sb.append("\t");
 		}
 		if (mbrUl != null) {
-			sb.append("\"mbrUl\": ").append(mbrUl);
+			sb.append("mbrUl: ").append(mbrUl);
 		}
 		
 		sb.append("\n");
diff --git a/src/main/java/org.onosproject.xran/codecs/api/ERABResponse.java b/src/main/java/org.onosproject.xran/codecs/api/ERABResponse.java
index fdf66fa..eaff5a9 100644
--- a/src/main/java/org.onosproject.xran/codecs/api/ERABResponse.java
+++ b/src/main/java/org.onosproject.xran/codecs/api/ERABResponse.java
@@ -13,9 +13,12 @@
 import java.io.UnsupportedEncodingException;
 import java.math.BigInteger;
 import java.io.Serializable;
-import org.openmuc.jasn1.ber.*;
-import org.openmuc.jasn1.ber.types.*;
-import org.openmuc.jasn1.ber.types.string.*;
+
+import com.fasterxml.jackson.annotation.JsonIgnore;
+import com.fasterxml.jackson.annotation.JsonValue;
+import org.onosproject.xran.codecs.ber.*;
+import org.onosproject.xran.codecs.ber.types.*;
+import org.onosproject.xran.codecs.ber.types.string.*;
 
 
 public class ERABResponse implements Serializable {
@@ -23,6 +26,7 @@
 	private static final long serialVersionUID = 1L;
 
 	public static final BerTag tag = new BerTag(BerTag.UNIVERSAL_CLASS, BerTag.CONSTRUCTED, 16);
+	@JsonIgnore
 	public byte[] code = null;
 	private List<ERABResponseItem> seqOf = null;
 
@@ -34,6 +38,7 @@
 		this.code = code;
 	}
 
+	@JsonValue
 	public List<ERABResponseItem> getERABResponseItem() {
 		if (seqOf == null) {
 			seqOf = new ArrayList<ERABResponseItem>();
diff --git a/src/main/java/org.onosproject.xran/codecs/api/ERABResponseItem.java b/src/main/java/org.onosproject.xran/codecs/api/ERABResponseItem.java
index 7608bed..db5181d 100644
--- a/src/main/java/org.onosproject.xran/codecs/api/ERABResponseItem.java
+++ b/src/main/java/org.onosproject.xran/codecs/api/ERABResponseItem.java
@@ -13,9 +13,11 @@
 import java.io.UnsupportedEncodingException;
 import java.math.BigInteger;
 import java.io.Serializable;
-import org.openmuc.jasn1.ber.*;
-import org.openmuc.jasn1.ber.types.*;
-import org.openmuc.jasn1.ber.types.string.*;
+
+import com.fasterxml.jackson.annotation.JsonIgnore;
+import org.onosproject.xran.codecs.ber.*;
+import org.onosproject.xran.codecs.ber.types.*;
+import org.onosproject.xran.codecs.ber.types.string.*;
 
 
 public class ERABResponseItem implements Serializable {
@@ -24,6 +26,7 @@
 
 	public static final BerTag tag = new BerTag(BerTag.UNIVERSAL_CLASS, BerTag.CONSTRUCTED, 16);
 
+	@JsonIgnore
 	public byte[] code = null;
 	private ERABID id = null;
 	private ERABDecision decision = null;
@@ -149,7 +152,7 @@
 			sb.append("\t");
 		}
 		if (id != null) {
-			sb.append("\"id\": ").append(id);
+			sb.append("id: ").append(id);
 		}
 		
 		sb.append(",\n");
@@ -157,7 +160,7 @@
 			sb.append("\t");
 		}
 		if (decision != null) {
-			sb.append("\"decision\": ").append(decision);
+			sb.append("decision: ").append(decision);
 		}
 		
 		sb.append("\n");
diff --git a/src/main/java/org.onosproject.xran/codecs/api/ERABType.java b/src/main/java/org.onosproject.xran/codecs/api/ERABType.java
index 9f2449c..7d95c98 100644
--- a/src/main/java/org.onosproject.xran/codecs/api/ERABType.java
+++ b/src/main/java/org.onosproject.xran/codecs/api/ERABType.java
@@ -13,9 +13,9 @@
 import java.io.UnsupportedEncodingException;
 import java.math.BigInteger;
 import java.io.Serializable;
-import org.openmuc.jasn1.ber.*;
-import org.openmuc.jasn1.ber.types.*;
-import org.openmuc.jasn1.ber.types.string.*;
+import org.onosproject.xran.codecs.ber.*;
+import org.onosproject.xran.codecs.ber.types.*;
+import org.onosproject.xran.codecs.ber.types.string.*;
 
 
 public class ERABType extends BerEnum {
diff --git a/src/main/java/org.onosproject.xran/codecs/api/EUTRANCellIdentifier.java b/src/main/java/org.onosproject.xran/codecs/api/EUTRANCellIdentifier.java
index 7c7f2a2..8dd094d 100644
--- a/src/main/java/org.onosproject.xran/codecs/api/EUTRANCellIdentifier.java
+++ b/src/main/java/org.onosproject.xran/codecs/api/EUTRANCellIdentifier.java
@@ -4,7 +4,7 @@
 
 package org.onosproject.xran.codecs.api;
 
-import org.openmuc.jasn1.ber.types.*;
+import org.onosproject.xran.codecs.ber.types.BerBitString;
 
 import javax.xml.bind.DatatypeConverter;
 import java.util.Arrays;
@@ -37,9 +37,4 @@
 		}
 		return super.equals(obj);
 	}
-
-	@Override
-	public String toString() {
-		return "\"" + DatatypeConverter.printHexBinary(value) + "\"";
-	}
 }
diff --git a/src/main/java/org.onosproject.xran/codecs/api/HOFailureCause.java b/src/main/java/org.onosproject.xran/codecs/api/HOFailureCause.java
index 67be0de..5723e83 100644
--- a/src/main/java/org.onosproject.xran/codecs/api/HOFailureCause.java
+++ b/src/main/java/org.onosproject.xran/codecs/api/HOFailureCause.java
@@ -4,7 +4,7 @@
 
 package org.onosproject.xran.codecs.api;
 
-import org.openmuc.jasn1.ber.types.BerEnum;
+import org.onosproject.xran.codecs.ber.types.BerEnum;
 
 import java.math.BigInteger;
 
diff --git a/src/main/java/org.onosproject.xran/codecs/api/MMEUES1APID.java b/src/main/java/org.onosproject.xran/codecs/api/MMEUES1APID.java
index 4967941..6edb788 100644
--- a/src/main/java/org.onosproject.xran/codecs/api/MMEUES1APID.java
+++ b/src/main/java/org.onosproject.xran/codecs/api/MMEUES1APID.java
@@ -15,9 +15,9 @@
 import java.io.Serializable;
 import java.util.Objects;
 
-import org.openmuc.jasn1.ber.*;
-import org.openmuc.jasn1.ber.types.*;
-import org.openmuc.jasn1.ber.types.string.*;
+import org.onosproject.xran.codecs.ber.*;
+import org.onosproject.xran.codecs.ber.types.*;
+import org.onosproject.xran.codecs.ber.types.string.*;
 
 
 public class MMEUES1APID extends BerInteger {
diff --git a/src/main/java/org.onosproject.xran/codecs/api/PCIARFCN.java b/src/main/java/org.onosproject.xran/codecs/api/PCIARFCN.java
index e3bd88f..a02833d 100644
--- a/src/main/java/org.onosproject.xran/codecs/api/PCIARFCN.java
+++ b/src/main/java/org.onosproject.xran/codecs/api/PCIARFCN.java
@@ -4,9 +4,10 @@
 
 package org.onosproject.xran.codecs.api;
 
-import org.openmuc.jasn1.ber.BerByteArrayOutputStream;
-import org.openmuc.jasn1.ber.BerLength;
-import org.openmuc.jasn1.ber.BerTag;
+import com.fasterxml.jackson.annotation.JsonIgnore;
+import org.onosproject.xran.codecs.ber.BerByteArrayOutputStream;
+import org.onosproject.xran.codecs.ber.BerLength;
+import org.onosproject.xran.codecs.ber.BerTag;
 
 import java.io.IOException;
 import java.io.InputStream;
@@ -19,6 +20,7 @@
 
 	public static final BerTag tag = new BerTag(BerTag.UNIVERSAL_CLASS, BerTag.CONSTRUCTED, 16);
 
+	@JsonIgnore
 	public byte[] code = null;
 	private PhysCellId pci = null;
 	private ARFCNValue earfcnDl = null;
@@ -144,7 +146,7 @@
 			sb.append("\t");
 		}
 		if (pci != null) {
-			sb.append("\"pci\": ").append(pci);
+			sb.append("pci: ").append(pci);
 		}
 		
 		sb.append(",\n");
@@ -152,7 +154,7 @@
 			sb.append("\t");
 		}
 		if (earfcnDl != null) {
-			sb.append("\"earfcnDl\": ").append(earfcnDl);
+			sb.append("earfcnDl: ").append(earfcnDl);
 		}
 		
 		sb.append("\n");
diff --git a/src/main/java/org.onosproject.xran/codecs/api/PLMNIdentity.java b/src/main/java/org.onosproject.xran/codecs/api/PLMNIdentity.java
index 5279ed6..39f0ec9 100644
--- a/src/main/java/org.onosproject.xran/codecs/api/PLMNIdentity.java
+++ b/src/main/java/org.onosproject.xran/codecs/api/PLMNIdentity.java
@@ -4,9 +4,8 @@
 
 package org.onosproject.xran.codecs.api;
 
-import org.openmuc.jasn1.ber.types.BerOctetString;
+import org.onosproject.xran.codecs.ber.types.BerOctetString;
 
-import javax.xml.bind.DatatypeConverter;
 import java.util.Arrays;
 
 
@@ -34,8 +33,4 @@
         return super.equals(obj);
     }
 
-    @Override
-    public String toString() {
-        return "\"" + DatatypeConverter.printHexBinary(value) + "\"";
-    }
 }
diff --git a/src/main/java/org.onosproject.xran/codecs/api/PRBUsage.java b/src/main/java/org.onosproject.xran/codecs/api/PRBUsage.java
index a36141c..ebe133f 100644
--- a/src/main/java/org.onosproject.xran/codecs/api/PRBUsage.java
+++ b/src/main/java/org.onosproject.xran/codecs/api/PRBUsage.java
@@ -13,9 +13,12 @@
 import java.io.UnsupportedEncodingException;
 import java.math.BigInteger;
 import java.io.Serializable;
-import org.openmuc.jasn1.ber.*;
-import org.openmuc.jasn1.ber.types.*;
-import org.openmuc.jasn1.ber.types.string.*;
+
+import com.fasterxml.jackson.annotation.JsonIgnore;
+import com.fasterxml.jackson.annotation.JsonValue;
+import org.onosproject.xran.codecs.ber.*;
+import org.onosproject.xran.codecs.ber.types.*;
+import org.onosproject.xran.codecs.ber.types.string.*;
 
 
 public class PRBUsage implements Serializable {
@@ -27,6 +30,7 @@
 		private static final long serialVersionUID = 1L;
 
 		public static final BerTag tag = new BerTag(BerTag.UNIVERSAL_CLASS, BerTag.CONSTRUCTED, 16);
+		@JsonIgnore
 		public byte[] code = null;
 		private List<BerInteger> seqOf = null;
 
@@ -38,7 +42,7 @@
 			this.code = code;
 		}
 
-		public List<BerInteger> getBerInteger() {
+		@JsonValue public List<BerInteger> getBerInteger() {
 			if (seqOf == null) {
 				seqOf = new ArrayList<BerInteger>();
 			}
@@ -156,7 +160,7 @@
 		private static final long serialVersionUID = 1L;
 
 		public static final BerTag tag = new BerTag(BerTag.UNIVERSAL_CLASS, BerTag.CONSTRUCTED, 16);
-		public byte[] code = null;
+		@JsonIgnore public byte[] code = null;
 		private List<BerInteger> seqOf = null;
 
 		public PrbUsageUl() {
@@ -167,7 +171,7 @@
 			this.code = code;
 		}
 
-		public List<BerInteger> getBerInteger() {
+		@JsonValue public List<BerInteger> getBerInteger() {
 			if (seqOf == null) {
 				seqOf = new ArrayList<BerInteger>();
 			}
@@ -282,7 +286,7 @@
 
 	public static final BerTag tag = new BerTag(BerTag.UNIVERSAL_CLASS, BerTag.CONSTRUCTED, 16);
 
-	public byte[] code = null;
+	@JsonIgnore public byte[] code = null;
 	private PrbUsageDl prbUsageDl = null;
 	private PrbUsageUl prbUsageUl = null;
 	
@@ -407,7 +411,7 @@
 			sb.append("\t");
 		}
 		if (prbUsageDl != null) {
-			sb.append("\"prbUsageDl\": ");
+			sb.append("prbUsageDl: ");
 			prbUsageDl.appendAsString(sb, indentLevel + 1);
 		}
 		
@@ -416,7 +420,7 @@
 			sb.append("\t");
 		}
 		if (prbUsageUl != null) {
-			sb.append("\"prbUsageUl\": ");
+			sb.append("prbUsageUl: ");
 			prbUsageUl.appendAsString(sb, indentLevel + 1);
 		}
 		
diff --git a/src/main/java/org.onosproject.xran/codecs/api/PhysCellId.java b/src/main/java/org.onosproject.xran/codecs/api/PhysCellId.java
index e05df5b..0c7e330 100644
--- a/src/main/java/org.onosproject.xran/codecs/api/PhysCellId.java
+++ b/src/main/java/org.onosproject.xran/codecs/api/PhysCellId.java
@@ -4,7 +4,7 @@
 
 package org.onosproject.xran.codecs.api;
 
-import org.openmuc.jasn1.ber.types.BerInteger;
+import org.onosproject.xran.codecs.ber.types.BerInteger;
 
 import java.math.BigInteger;
 
diff --git a/src/main/java/org.onosproject.xran/codecs/api/PropScell.java b/src/main/java/org.onosproject.xran/codecs/api/PropScell.java
index 9d473be..2e9400b 100644
--- a/src/main/java/org.onosproject.xran/codecs/api/PropScell.java
+++ b/src/main/java/org.onosproject.xran/codecs/api/PropScell.java
@@ -4,12 +4,13 @@
 
 package org.onosproject.xran.codecs.api;
 
-import org.openmuc.jasn1.ber.BerByteArrayOutputStream;
-import org.openmuc.jasn1.ber.BerLength;
-import org.openmuc.jasn1.ber.BerTag;
-import org.openmuc.jasn1.ber.types.BerBoolean;
-import org.openmuc.jasn1.ber.types.BerEnum;
-import org.openmuc.jasn1.ber.types.BerInteger;
+import com.fasterxml.jackson.annotation.JsonIgnore;
+import org.onosproject.xran.codecs.ber.BerByteArrayOutputStream;
+import org.onosproject.xran.codecs.ber.BerLength;
+import org.onosproject.xran.codecs.ber.BerTag;
+import org.onosproject.xran.codecs.ber.types.BerBoolean;
+import org.onosproject.xran.codecs.ber.types.BerEnum;
+import org.onosproject.xran.codecs.ber.types.BerInteger;
 
 import java.io.IOException;
 import java.io.InputStream;
@@ -22,6 +23,7 @@
 
 	public static final BerTag tag = new BerTag(BerTag.UNIVERSAL_CLASS, BerTag.CONSTRUCTED, 16);
 
+	@JsonIgnore
 	public byte[] code = null;
 	private PCIARFCN pciArfcn = null;
 	private BerBoolean crossCarrierSchedEnable = null;
diff --git a/src/main/java/org.onosproject.xran/codecs/api/QCI.java b/src/main/java/org.onosproject.xran/codecs/api/QCI.java
index adee94e..c8a4e69 100644
--- a/src/main/java/org.onosproject.xran/codecs/api/QCI.java
+++ b/src/main/java/org.onosproject.xran/codecs/api/QCI.java
@@ -4,7 +4,7 @@
 
 package org.onosproject.xran.codecs.api;
 
-import org.openmuc.jasn1.ber.types.BerInteger;
+import org.onosproject.xran.codecs.ber.types.BerInteger;
 
 import java.math.BigInteger;
 
diff --git a/src/main/java/org.onosproject.xran/codecs/api/RSRPRange.java b/src/main/java/org.onosproject.xran/codecs/api/RSRPRange.java
index 592f41e..c841f05 100644
--- a/src/main/java/org.onosproject.xran/codecs/api/RSRPRange.java
+++ b/src/main/java/org.onosproject.xran/codecs/api/RSRPRange.java
@@ -13,9 +13,9 @@
 import java.io.UnsupportedEncodingException;
 import java.math.BigInteger;
 import java.io.Serializable;
-import org.openmuc.jasn1.ber.*;
-import org.openmuc.jasn1.ber.types.*;
-import org.openmuc.jasn1.ber.types.string.*;
+import org.onosproject.xran.codecs.ber.*;
+import org.onosproject.xran.codecs.ber.types.*;
+import org.onosproject.xran.codecs.ber.types.string.*;
 
 
 public class RSRPRange extends BerInteger {
diff --git a/src/main/java/org.onosproject.xran/codecs/api/RSRQRange.java b/src/main/java/org.onosproject.xran/codecs/api/RSRQRange.java
index 4d74e85..c0115a3 100644
--- a/src/main/java/org.onosproject.xran/codecs/api/RSRQRange.java
+++ b/src/main/java/org.onosproject.xran/codecs/api/RSRQRange.java
@@ -13,9 +13,9 @@
 import java.io.UnsupportedEncodingException;
 import java.math.BigInteger;
 import java.io.Serializable;
-import org.openmuc.jasn1.ber.*;
-import org.openmuc.jasn1.ber.types.*;
-import org.openmuc.jasn1.ber.types.string.*;
+import org.onosproject.xran.codecs.ber.*;
+import org.onosproject.xran.codecs.ber.types.*;
+import org.onosproject.xran.codecs.ber.types.string.*;
 
 
 public class RSRQRange extends BerInteger {
diff --git a/src/main/java/org.onosproject.xran/codecs/api/RXSigMeasRepInterval.java b/src/main/java/org.onosproject.xran/codecs/api/RXSigMeasRepInterval.java
index 8ce29aa..55be762 100644
--- a/src/main/java/org.onosproject.xran/codecs/api/RXSigMeasRepInterval.java
+++ b/src/main/java/org.onosproject.xran/codecs/api/RXSigMeasRepInterval.java
@@ -13,9 +13,9 @@
 import java.io.UnsupportedEncodingException;
 import java.math.BigInteger;
 import java.io.Serializable;
-import org.openmuc.jasn1.ber.*;
-import org.openmuc.jasn1.ber.types.*;
-import org.openmuc.jasn1.ber.types.string.*;
+import org.onosproject.xran.codecs.ber.*;
+import org.onosproject.xran.codecs.ber.types.*;
+import org.onosproject.xran.codecs.ber.types.string.*;
 
 
 public class RXSigMeasRepInterval extends BerEnum {
diff --git a/src/main/java/org.onosproject.xran/codecs/api/RXSigRepQty.java b/src/main/java/org.onosproject.xran/codecs/api/RXSigRepQty.java
index 8794f09..1c7f3ad 100644
--- a/src/main/java/org.onosproject.xran/codecs/api/RXSigRepQty.java
+++ b/src/main/java/org.onosproject.xran/codecs/api/RXSigRepQty.java
@@ -13,9 +13,9 @@
 import java.io.UnsupportedEncodingException;
 import java.math.BigInteger;
 import java.io.Serializable;
-import org.openmuc.jasn1.ber.*;
-import org.openmuc.jasn1.ber.types.*;
-import org.openmuc.jasn1.ber.types.string.*;
+import org.onosproject.xran.codecs.ber.*;
+import org.onosproject.xran.codecs.ber.types.*;
+import org.onosproject.xran.codecs.ber.types.string.*;
 
 
 public class RXSigRepQty extends BerEnum {
diff --git a/src/main/java/org.onosproject.xran/codecs/api/RXSigReport.java b/src/main/java/org.onosproject.xran/codecs/api/RXSigReport.java
index f07dd09..d11dc34 100644
--- a/src/main/java/org.onosproject.xran/codecs/api/RXSigReport.java
+++ b/src/main/java/org.onosproject.xran/codecs/api/RXSigReport.java
@@ -13,9 +13,11 @@
 import java.io.UnsupportedEncodingException;
 import java.math.BigInteger;
 import java.io.Serializable;
-import org.openmuc.jasn1.ber.*;
-import org.openmuc.jasn1.ber.types.*;
-import org.openmuc.jasn1.ber.types.string.*;
+
+import com.fasterxml.jackson.annotation.JsonIgnore;
+import org.onosproject.xran.codecs.ber.*;
+import org.onosproject.xran.codecs.ber.types.*;
+import org.onosproject.xran.codecs.ber.types.string.*;
 
 
 public class RXSigReport implements Serializable {
@@ -24,6 +26,7 @@
 
 	public static final BerTag tag = new BerTag(BerTag.UNIVERSAL_CLASS, BerTag.CONSTRUCTED, 16);
 
+	@JsonIgnore
 	public byte[] code = null;
 	private PCIARFCN pciArfcn = null;
 	private RSRPRange rsrp = null;
@@ -172,7 +175,7 @@
 			sb.append("\t");
 		}
 		if (pciArfcn != null) {
-			sb.append("\"pciArfcn\": ");
+			sb.append("pciArfcn: ");
 			pciArfcn.appendAsString(sb, indentLevel + 1);
 		}
 		
@@ -181,14 +184,14 @@
 			sb.append("\t");
 		}
 		if (rsrp != null) {
-			sb.append("\"rsrp\": ").append(rsrp);
+			sb.append("rsrp: ").append(rsrp);
 		}
 		sb.append(",\n");
 		for (int i = 0; i < indentLevel + 1; i++) {
 			sb.append("\t");
 		}
 		if (rsrq != null) {
-			sb.append("\"rsrq\": ").append(rsrq);
+			sb.append("rsrq: ").append(rsrq);
 		}
 		
 		sb.append("\n");
diff --git a/src/main/java/org.onosproject.xran/codecs/api/RadioRepPerServCell.java b/src/main/java/org.onosproject.xran/codecs/api/RadioRepPerServCell.java
index 525fb0a..93d7dde 100644
--- a/src/main/java/org.onosproject.xran/codecs/api/RadioRepPerServCell.java
+++ b/src/main/java/org.onosproject.xran/codecs/api/RadioRepPerServCell.java
@@ -4,10 +4,12 @@
 
 package org.onosproject.xran.codecs.api;
 
-import org.openmuc.jasn1.ber.BerByteArrayOutputStream;
-import org.openmuc.jasn1.ber.BerLength;
-import org.openmuc.jasn1.ber.BerTag;
-import org.openmuc.jasn1.ber.types.BerInteger;
+import com.fasterxml.jackson.annotation.JsonIgnore;
+import com.fasterxml.jackson.annotation.JsonValue;
+import org.onosproject.xran.codecs.ber.BerByteArrayOutputStream;
+import org.onosproject.xran.codecs.ber.BerLength;
+import org.onosproject.xran.codecs.ber.BerTag;
+import org.onosproject.xran.codecs.ber.types.BerInteger;
 
 import java.io.IOException;
 import java.io.InputStream;
@@ -26,6 +28,7 @@
 		private static final long serialVersionUID = 1L;
 
 		public static final BerTag tag = new BerTag(BerTag.UNIVERSAL_CLASS, BerTag.CONSTRUCTED, 16);
+		@JsonIgnore
 		public byte[] code = null;
 		private List<BerInteger> seqOf = null;
 
@@ -37,7 +40,7 @@
 			this.code = code;
 		}
 
-		public List<BerInteger> getBerInteger() {
+		@JsonValue public List<BerInteger> getBerInteger() {
 			if (seqOf == null) {
 				seqOf = new ArrayList<BerInteger>();
 			}
@@ -156,7 +159,7 @@
 		private static final long serialVersionUID = 1L;
 
 		public static final BerTag tag = new BerTag(BerTag.UNIVERSAL_CLASS, BerTag.CONSTRUCTED, 16);
-		public byte[] code = null;
+		@JsonIgnore public byte[] code = null;
 		private List<BerInteger> seqOf = null;
 
 		public RiHist() {
@@ -167,7 +170,7 @@
 			this.code = code;
 		}
 
-		public List<BerInteger> getBerInteger() {
+		@JsonValue public List<BerInteger> getBerInteger() {
 			if (seqOf == null) {
 				seqOf = new ArrayList<BerInteger>();
 			}
@@ -287,7 +290,7 @@
 		private static final long serialVersionUID = 1L;
 
 		public static final BerTag tag = new BerTag(BerTag.UNIVERSAL_CLASS, BerTag.CONSTRUCTED, 16);
-		public byte[] code = null;
+		@JsonIgnore public byte[] code = null;
 		private List<BerInteger> seqOf = null;
 
 		public PuschSinrHist() {
@@ -298,7 +301,7 @@
 			this.code = code;
 		}
 
-		public List<BerInteger> getBerInteger() {
+		@JsonValue public List<BerInteger> getBerInteger() {
 			if (seqOf == null) {
 				seqOf = new ArrayList<BerInteger>();
 			}
@@ -418,7 +421,7 @@
 		private static final long serialVersionUID = 1L;
 
 		public static final BerTag tag = new BerTag(BerTag.UNIVERSAL_CLASS, BerTag.CONSTRUCTED, 16);
-		public byte[] code = null;
+		@JsonIgnore public byte[] code = null;
 		private List<BerInteger> seqOf = null;
 
 		public PucchSinrHist() {
@@ -429,6 +432,7 @@
 			this.code = code;
 		}
 
+		@JsonValue
 		public List<BerInteger> getBerInteger() {
 			if (seqOf == null) {
 				seqOf = new ArrayList<BerInteger>();
@@ -545,7 +549,7 @@
 
 	public static final BerTag tag = new BerTag(BerTag.UNIVERSAL_CLASS, BerTag.CONSTRUCTED, 16);
 
-	public byte[] code = null;
+	@JsonIgnore public byte[] code = null;
 	private PCIARFCN pciArfcn = null;
 	private CqiHist cqiHist = null;
 	private RiHist riHist = null;
@@ -739,7 +743,7 @@
 			sb.append("\t");
 		}
 		if (pciArfcn != null) {
-			sb.append("\"pciArfcn\": ");
+			sb.append("pciArfcn: ");
 			pciArfcn.appendAsString(sb, indentLevel + 1);
 		}
 		
@@ -748,7 +752,7 @@
 			sb.append("\t");
 		}
 		if (cqiHist != null) {
-			sb.append("\"cqiHist\": ");
+			sb.append("cqiHist: ");
 			cqiHist.appendAsString(sb, indentLevel + 1);
 		}
 		
@@ -757,7 +761,7 @@
 			sb.append("\t");
 		}
 		if (riHist != null) {
-			sb.append("\"riHist\": ");
+			sb.append("riHist: ");
 			riHist.appendAsString(sb, indentLevel + 1);
 		}
 		
@@ -766,7 +770,7 @@
 			sb.append("\t");
 		}
 		if (puschSinrHist != null) {
-			sb.append("\"puschSinrHist\": ");
+			sb.append("puschSinrHist: ");
 			puschSinrHist.appendAsString(sb, indentLevel + 1);
 		}
 		
@@ -775,7 +779,7 @@
 			sb.append("\t");
 		}
 		if (pucchSinrHist != null) {
-			sb.append("\"pucchSinrHist\": ");
+			sb.append("pucchSinrHist: ");
 			pucchSinrHist.appendAsString(sb, indentLevel + 1);
 		}
 		
diff --git a/src/main/java/org.onosproject.xran/codecs/api/ReconfIndReason.java b/src/main/java/org.onosproject.xran/codecs/api/ReconfIndReason.java
index 6ab2221..3c08c48 100644
--- a/src/main/java/org.onosproject.xran/codecs/api/ReconfIndReason.java
+++ b/src/main/java/org.onosproject.xran/codecs/api/ReconfIndReason.java
@@ -13,9 +13,9 @@
 import java.io.UnsupportedEncodingException;
 import java.math.BigInteger;
 import java.io.Serializable;
-import org.openmuc.jasn1.ber.*;
-import org.openmuc.jasn1.ber.types.*;
-import org.openmuc.jasn1.ber.types.string.*;
+import org.onosproject.xran.codecs.ber.*;
+import org.onosproject.xran.codecs.ber.types.*;
+import org.onosproject.xran.codecs.ber.types.string.*;
 
 
 public class ReconfIndReason extends BerEnum {
diff --git a/src/main/java/org.onosproject.xran/codecs/api/RelCause.java b/src/main/java/org.onosproject.xran/codecs/api/RelCause.java
index c983d06..5d1191d 100644
--- a/src/main/java/org.onosproject.xran/codecs/api/RelCause.java
+++ b/src/main/java/org.onosproject.xran/codecs/api/RelCause.java
@@ -13,9 +13,9 @@
 import java.io.UnsupportedEncodingException;
 import java.math.BigInteger;
 import java.io.Serializable;
-import org.openmuc.jasn1.ber.*;
-import org.openmuc.jasn1.ber.types.*;
-import org.openmuc.jasn1.ber.types.string.*;
+import org.onosproject.xran.codecs.ber.*;
+import org.onosproject.xran.codecs.ber.types.*;
+import org.onosproject.xran.codecs.ber.types.string.*;
 
 
 public class RelCause extends BerEnum {
diff --git a/src/main/java/org.onosproject.xran/codecs/api/SchedMeasRepPerServCell.java b/src/main/java/org.onosproject.xran/codecs/api/SchedMeasRepPerServCell.java
index a2ed8fb..753fa5f 100644
--- a/src/main/java/org.onosproject.xran/codecs/api/SchedMeasRepPerServCell.java
+++ b/src/main/java/org.onosproject.xran/codecs/api/SchedMeasRepPerServCell.java
@@ -13,9 +13,12 @@
 import java.io.UnsupportedEncodingException;
 import java.math.BigInteger;
 import java.io.Serializable;
-import org.openmuc.jasn1.ber.*;
-import org.openmuc.jasn1.ber.types.*;
-import org.openmuc.jasn1.ber.types.string.*;
+
+import com.fasterxml.jackson.annotation.JsonIgnore;
+import com.fasterxml.jackson.annotation.JsonValue;
+import org.onosproject.xran.codecs.ber.*;
+import org.onosproject.xran.codecs.ber.types.*;
+import org.onosproject.xran.codecs.ber.types.string.*;
 
 
 public class SchedMeasRepPerServCell implements Serializable {
@@ -27,6 +30,7 @@
 		private static final long serialVersionUID = 1L;
 
 		public static final BerTag tag = new BerTag(BerTag.UNIVERSAL_CLASS, BerTag.CONSTRUCTED, 16);
+		@JsonIgnore
 		public byte[] code = null;
 		private List<QCI> seqOf = null;
 
@@ -38,6 +42,7 @@
 			this.code = code;
 		}
 
+		@JsonValue
 		public List<QCI> getQCI() {
 			if (seqOf == null) {
 				seqOf = new ArrayList<QCI>();
@@ -157,7 +162,7 @@
 		private static final long serialVersionUID = 1L;
 
 		public static final BerTag tag = new BerTag(BerTag.UNIVERSAL_CLASS, BerTag.CONSTRUCTED, 16);
-		public byte[] code = null;
+		@JsonIgnore public byte[] code = null;
 		private List<BerInteger> seqOf = null;
 
 		public McsDl() {
@@ -168,7 +173,7 @@
 			this.code = code;
 		}
 
-		public List<BerInteger> getBerInteger() {
+		@JsonValue public List<BerInteger> getBerInteger() {
 			if (seqOf == null) {
 				seqOf = new ArrayList<BerInteger>();
 			}
@@ -287,7 +292,7 @@
 		private static final long serialVersionUID = 1L;
 
 		public static final BerTag tag = new BerTag(BerTag.UNIVERSAL_CLASS, BerTag.CONSTRUCTED, 16);
-		public byte[] code = null;
+		@JsonIgnore public byte[] code = null;
 		private List<BerInteger> seqOf = null;
 
 		public NumSchedTtisDl() {
@@ -298,7 +303,7 @@
 			this.code = code;
 		}
 
-		public List<BerInteger> getBerInteger() {
+		@JsonValue public List<BerInteger> getBerInteger() {
 			if (seqOf == null) {
 				seqOf = new ArrayList<BerInteger>();
 			}
@@ -417,7 +422,7 @@
 		private static final long serialVersionUID = 1L;
 
 		public static final BerTag tag = new BerTag(BerTag.UNIVERSAL_CLASS, BerTag.CONSTRUCTED, 16);
-		public byte[] code = null;
+		@JsonIgnore public byte[] code = null;
 		private List<BerInteger> seqOf = null;
 
 		public McsUl() {
@@ -428,7 +433,7 @@
 			this.code = code;
 		}
 
-		public List<BerInteger> getBerInteger() {
+		@JsonValue public List<BerInteger> getBerInteger() {
 			if (seqOf == null) {
 				seqOf = new ArrayList<BerInteger>();
 			}
@@ -547,7 +552,7 @@
 		private static final long serialVersionUID = 1L;
 
 		public static final BerTag tag = new BerTag(BerTag.UNIVERSAL_CLASS, BerTag.CONSTRUCTED, 16);
-		public byte[] code = null;
+		@JsonIgnore public byte[] code = null;
 		private List<BerInteger> seqOf = null;
 
 		public NumSchedTtisUl() {
@@ -558,7 +563,7 @@
 			this.code = code;
 		}
 
-		public List<BerInteger> getBerInteger() {
+		@JsonValue public List<BerInteger> getBerInteger() {
 			if (seqOf == null) {
 				seqOf = new ArrayList<BerInteger>();
 			}
@@ -677,7 +682,7 @@
 		private static final long serialVersionUID = 1L;
 
 		public static final BerTag tag = new BerTag(BerTag.UNIVERSAL_CLASS, BerTag.CONSTRUCTED, 16);
-		public byte[] code = null;
+		@JsonIgnore public byte[] code = null;
 		private List<BerInteger> seqOf = null;
 
 		public RankDl1() {
@@ -688,7 +693,7 @@
 			this.code = code;
 		}
 
-		public List<BerInteger> getBerInteger() {
+		@JsonValue public List<BerInteger> getBerInteger() {
 			if (seqOf == null) {
 				seqOf = new ArrayList<BerInteger>();
 			}
@@ -807,7 +812,7 @@
 		private static final long serialVersionUID = 1L;
 
 		public static final BerTag tag = new BerTag(BerTag.UNIVERSAL_CLASS, BerTag.CONSTRUCTED, 16);
-		public byte[] code = null;
+		@JsonIgnore public byte[] code = null;
 		private List<BerInteger> seqOf = null;
 
 		public RankDl2() {
@@ -818,6 +823,7 @@
 			this.code = code;
 		}
 
+		@JsonValue
 		public List<BerInteger> getBerInteger() {
 			if (seqOf == null) {
 				seqOf = new ArrayList<BerInteger>();
@@ -934,7 +940,7 @@
 
 	public static final BerTag tag = new BerTag(BerTag.UNIVERSAL_CLASS, BerTag.CONSTRUCTED, 16);
 
-	public byte[] code = null;
+	@JsonIgnore public byte[] code = null;
 	private PCIARFCN pciArfcn = null;
 	private QciVals qciVals = null;
 	private PRBUsage prbUsage = null;
@@ -1220,7 +1226,7 @@
 			sb.append("\t");
 		}
 		if (pciArfcn != null) {
-			sb.append("\"pciArfcn\": ");
+			sb.append("pciArfcn: ");
 			pciArfcn.appendAsString(sb, indentLevel + 1);
 		}
 		
@@ -1229,7 +1235,7 @@
 			sb.append("\t");
 		}
 		if (qciVals != null) {
-			sb.append("\"qciVals\": ");
+			sb.append("qciVals: ");
 			qciVals.appendAsString(sb, indentLevel + 1);
 		}
 		
@@ -1238,7 +1244,7 @@
 			sb.append("\t");
 		}
 		if (prbUsage != null) {
-			sb.append("\"prbUsage\": ");
+			sb.append("prbUsage: ");
 			prbUsage.appendAsString(sb, indentLevel + 1);
 		}
 		
@@ -1247,7 +1253,7 @@
 			sb.append("\t");
 		}
 		if (mcsDl != null) {
-			sb.append("\"mcsDl\": ");
+			sb.append("mcsDl: ");
 			mcsDl.appendAsString(sb, indentLevel + 1);
 		}
 		
@@ -1256,7 +1262,7 @@
 			sb.append("\t");
 		}
 		if (numSchedTtisDl != null) {
-			sb.append("\"numSchedTtisDl\": ");
+			sb.append("numSchedTtisDl: ");
 			numSchedTtisDl.appendAsString(sb, indentLevel + 1);
 		}
 		
@@ -1265,7 +1271,7 @@
 			sb.append("\t");
 		}
 		if (mcsUl != null) {
-			sb.append("\"mcsUl\": ");
+			sb.append("mcsUl: ");
 			mcsUl.appendAsString(sb, indentLevel + 1);
 		}
 		
@@ -1274,7 +1280,7 @@
 			sb.append("\t");
 		}
 		if (numSchedTtisUl != null) {
-			sb.append("\"numSchedTtisUl\": ");
+			sb.append("numSchedTtisUl: ");
 			numSchedTtisUl.appendAsString(sb, indentLevel + 1);
 		}
 		
@@ -1283,7 +1289,7 @@
 			sb.append("\t");
 		}
 		if (rankDl1 != null) {
-			sb.append("\"rankDl1\": ");
+			sb.append("rankDl1: ");
 			rankDl1.appendAsString(sb, indentLevel + 1);
 		}
 		
@@ -1292,7 +1298,7 @@
 			sb.append("\t");
 		}
 		if (rankDl2 != null) {
-			sb.append("\"rankDl2\": ");
+			sb.append("rankDl2: ");
 			rankDl2.appendAsString(sb, indentLevel + 1);
 		}
 		
diff --git a/src/main/java/org.onosproject.xran/codecs/api/TrafficSplitPercentage.java b/src/main/java/org.onosproject.xran/codecs/api/TrafficSplitPercentage.java
index bf3031a..cf37663 100644
--- a/src/main/java/org.onosproject.xran/codecs/api/TrafficSplitPercentage.java
+++ b/src/main/java/org.onosproject.xran/codecs/api/TrafficSplitPercentage.java
@@ -13,9 +13,11 @@
 import java.io.UnsupportedEncodingException;
 import java.math.BigInteger;
 import java.io.Serializable;
-import org.openmuc.jasn1.ber.*;
-import org.openmuc.jasn1.ber.types.*;
-import org.openmuc.jasn1.ber.types.string.*;
+
+import com.fasterxml.jackson.annotation.JsonIgnore;
+import org.onosproject.xran.codecs.ber.*;
+import org.onosproject.xran.codecs.ber.types.*;
+import org.onosproject.xran.codecs.ber.types.string.*;
 
 
 public class TrafficSplitPercentage implements Serializable {
@@ -24,6 +26,7 @@
 
 	public static final BerTag tag = new BerTag(BerTag.UNIVERSAL_CLASS, BerTag.CONSTRUCTED, 16);
 
+	@JsonIgnore
 	public byte[] code = null;
 	private ECGI ecgi = null;
 	private BerInteger trafficPercentDl = null;
@@ -179,7 +182,7 @@
 			sb.append("\t");
 		}
 		if (ecgi != null) {
-			sb.append("\"ecgi\": ");
+			sb.append("ecgi: ");
 			ecgi.appendAsString(sb, indentLevel + 1);
 		}
 		
@@ -188,7 +191,7 @@
 			for (int i = 0; i < indentLevel + 1; i++) {
 				sb.append("\t");
 			}
-			sb.append("\"trafficPercentDl\": ").append(trafficPercentDl);
+			sb.append("trafficPercentDl: ").append(trafficPercentDl);
 		}
 		
 		if (trafficPercentUl != null) {
@@ -196,7 +199,7 @@
 			for (int i = 0; i < indentLevel + 1; i++) {
 				sb.append("\t");
 			}
-			sb.append("\"trafficPercentUl\": ").append(trafficPercentUl);
+			sb.append("trafficPercentUl: ").append(trafficPercentUl);
 		}
 		
 		sb.append("\n");
diff --git a/src/main/java/org.onosproject.xran/codecs/api/UEAMBR.java b/src/main/java/org.onosproject.xran/codecs/api/UEAMBR.java
index eeadfa2..0fb8a7f 100644
--- a/src/main/java/org.onosproject.xran/codecs/api/UEAMBR.java
+++ b/src/main/java/org.onosproject.xran/codecs/api/UEAMBR.java
@@ -4,9 +4,10 @@
 
 package org.onosproject.xran.codecs.api;
 
-import org.openmuc.jasn1.ber.BerByteArrayOutputStream;
-import org.openmuc.jasn1.ber.BerLength;
-import org.openmuc.jasn1.ber.BerTag;
+import com.fasterxml.jackson.annotation.JsonIgnore;
+import org.onosproject.xran.codecs.ber.BerByteArrayOutputStream;
+import org.onosproject.xran.codecs.ber.BerLength;
+import org.onosproject.xran.codecs.ber.BerTag;
 
 import java.io.IOException;
 import java.io.InputStream;
@@ -19,6 +20,7 @@
 
 	public static final BerTag tag = new BerTag(BerTag.UNIVERSAL_CLASS, BerTag.CONSTRUCTED, 16);
 
+	@JsonIgnore
 	public byte[] code = null;
 	private BitRate ambrDl = null;
 	private BitRate ambrUl = null;
@@ -144,7 +146,7 @@
 			sb.append("\t");
 		}
 		if (ambrDl != null) {
-			sb.append("\"ambrDl\": ").append(ambrDl);
+			sb.append("ambrDl: ").append(ambrDl);
 		}
 		
 		sb.append(",\n");
@@ -152,7 +154,7 @@
 			sb.append("\t");
 		}
 		if (ambrUl != null) {
-			sb.append("\"ambrUl\": ").append(ambrUl);
+			sb.append("ambrUl: ").append(ambrUl);
 		}
 		
 		sb.append("\n");
diff --git a/src/main/java/org.onosproject.xran/codecs/api/XICICPA.java b/src/main/java/org.onosproject.xran/codecs/api/XICICPA.java
index 4586eac..5c69cfa 100644
--- a/src/main/java/org.onosproject.xran/codecs/api/XICICPA.java
+++ b/src/main/java/org.onosproject.xran/codecs/api/XICICPA.java
@@ -4,7 +4,7 @@
 
 package org.onosproject.xran.codecs.api;
 
-import org.openmuc.jasn1.ber.types.BerEnum;
+import org.onosproject.xran.codecs.ber.types.BerEnum;
 
 import java.math.BigInteger;
 
diff --git a/src/main/java/org.onosproject.xran/codecs/ber/BerByteArrayOutputStream.java b/src/main/java/org.onosproject.xran/codecs/ber/BerByteArrayOutputStream.java
new file mode 100644
index 0000000..e32f381
--- /dev/null
+++ b/src/main/java/org.onosproject.xran/codecs/ber/BerByteArrayOutputStream.java
@@ -0,0 +1,115 @@
+/* This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
+package org.onosproject.xran.codecs.ber;
+
+import java.io.IOException;
+import java.io.OutputStream;
+import java.nio.ByteBuffer;
+
+public class BerByteArrayOutputStream extends OutputStream {
+
+    private final boolean automaticResize;
+    public byte[] buffer;
+    public int index;
+
+    /**
+     * Creates a <code>BerByteArrayOutputStream</code> with a byte array of size <code>bufferSize</code>. The buffer
+     * will not be resized automatically. Use {@link #BerByteArrayOutputStream(int, boolean)} instead if you want the
+     * buffer to be dynamically resized.
+     *
+     * @param bufferSize the size of the underlying buffer
+     */
+    public BerByteArrayOutputStream(int bufferSize) {
+        this(new byte[bufferSize], bufferSize - 1, false);
+    }
+
+    public BerByteArrayOutputStream(int bufferSize, boolean automaticResize) {
+        this(new byte[bufferSize], bufferSize - 1, automaticResize);
+    }
+
+    public BerByteArrayOutputStream(byte[] buffer) {
+        this(buffer, buffer.length - 1, false);
+    }
+
+    public BerByteArrayOutputStream(byte[] buffer, int startingIndex) {
+        this(buffer, startingIndex, false);
+    }
+
+    public BerByteArrayOutputStream(byte[] buffer, int startingIndex, boolean automaticResize) {
+        if (buffer.length <= 0) {
+            throw new IllegalArgumentException("buffer size may not be <= 0");
+        }
+        this.buffer = buffer;
+        index = startingIndex;
+        this.automaticResize = automaticResize;
+    }
+
+    @Override
+    public void write(int arg0) throws IOException {
+        write((byte) arg0);
+    }
+
+    public void write(byte arg0) throws IOException {
+        try {
+            buffer[index] = arg0;
+        } catch (ArrayIndexOutOfBoundsException e) {
+            if (automaticResize) {
+                resize();
+                buffer[index] = arg0;
+            } else {
+                throw new ArrayIndexOutOfBoundsException("buffer.length = " + buffer.length);
+            }
+        }
+        index--;
+    }
+
+    private void resize() {
+        byte[] newBuffer = new byte[buffer.length * 2];
+        System.arraycopy(buffer, index + 1, newBuffer, buffer.length + index + 1, buffer.length - index - 1);
+        index += buffer.length;
+        buffer = newBuffer;
+
+    }
+
+    @Override
+    public void write(byte[] byteArray) throws IOException {
+        for (int i = byteArray.length - 1; i >= 0; i--) {
+            try {
+                buffer[index] = byteArray[i];
+            } catch (ArrayIndexOutOfBoundsException e) {
+                if (automaticResize) {
+                    resize();
+                    buffer[index] = byteArray[i];
+                } else {
+                    throw new ArrayIndexOutOfBoundsException("buffer.length = " + buffer.length);
+                }
+            }
+            index--;
+        }
+    }
+
+    /**
+     * Returns a new array containing the subarray of the stream array that contains the coded content.
+     *
+     * @return a new array containing the subarray of the stream array
+     */
+    public byte[] getArray() {
+        if (index == -1) {
+            return buffer;
+        }
+        int subBufferLength = buffer.length - index - 1;
+        byte[] subBuffer = new byte[subBufferLength];
+        System.arraycopy(buffer, index + 1, subBuffer, 0, subBufferLength);
+        return subBuffer;
+
+    }
+
+    public ByteBuffer getByteBuffer() {
+        return ByteBuffer.wrap(buffer, index + 1, buffer.length - (index + 1));
+    }
+
+    public void reset() {
+        index = buffer.length - 1;
+    }
+}
diff --git a/src/main/java/org.onosproject.xran/codecs/ber/BerLength.java b/src/main/java/org.onosproject.xran/codecs/ber/BerLength.java
new file mode 100644
index 0000000..8057a58
--- /dev/null
+++ b/src/main/java/org.onosproject.xran/codecs/ber/BerLength.java
@@ -0,0 +1,115 @@
+/* This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
+package org.onosproject.xran.codecs.ber;
+
+import java.io.EOFException;
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.Serializable;
+
+public class BerLength implements Serializable {
+
+    private static final long serialVersionUID = 1L;
+
+    public int val;
+
+    public BerLength() {
+    }
+
+    public static int skip(InputStream is) throws IOException {
+
+        int val = is.read();
+        if (val == -1) {
+            throw new EOFException("Unexpected end of input stream.");
+        }
+
+        if ((val & 0x80) == 0) {
+            return 1;
+        }
+
+        int lengthLength = val & 0x7f;
+
+        // check for indefinite length
+        if (lengthLength == 0) {
+            val = -1;
+            return 1;
+        }
+
+        if (lengthLength > 4) {
+            throw new IOException("Length is out of bound!");
+        }
+
+        for (int i = 0; i < lengthLength; i++) {
+            int nextByte = is.read();
+            if (nextByte == -1) {
+                throw new EOFException("Unexpected end of input stream.");
+            }
+        }
+
+        return lengthLength + 1;
+    }
+
+    public static int encodeLength(BerByteArrayOutputStream os, int length) throws IOException {
+        // the indefinite form is ignored for now
+
+        if (length <= 127) {
+            // this is the short form, it is coded differently than the long
+            // form for values > 127
+            os.write((byte) length);
+            return 1;
+        } else {
+            int numLengthBytes = 1;
+
+            while (((int) (Math.pow(2, 8 * numLengthBytes) - 1)) < length) {
+                numLengthBytes++;
+            }
+
+            for (int i = 0; i < numLengthBytes; i++) {
+                os.write((length >> 8 * i) & 0xff);
+            }
+
+            os.write(0x80 | numLengthBytes);
+
+            return 1 + numLengthBytes;
+        }
+
+    }
+
+    public int decode(InputStream is) throws IOException {
+
+        val = is.read();
+        if (val == -1) {
+            throw new EOFException("Unexpected end of input stream.");
+        }
+
+        if ((val & 0x80) == 0) {
+            return 1;
+        }
+
+        int lengthLength = val & 0x7f;
+
+        // check for indefinite length
+        if (lengthLength == 0) {
+            val = -1;
+            return 1;
+        }
+
+        if (lengthLength > 4) {
+            throw new IOException("Length is out of bound!");
+        }
+
+        val = 0;
+
+        for (int i = 0; i < lengthLength; i++) {
+            int nextByte = is.read();
+            if (nextByte == -1) {
+                throw new EOFException("Unexpected end of input stream.");
+            }
+            val |= nextByte << (8 * (lengthLength - i - 1));
+        }
+
+        return lengthLength + 1;
+    }
+
+}
diff --git a/src/main/java/org.onosproject.xran/codecs/ber/BerTag.java b/src/main/java/org.onosproject.xran/codecs/ber/BerTag.java
new file mode 100644
index 0000000..5d5df85
--- /dev/null
+++ b/src/main/java/org.onosproject.xran/codecs/ber/BerTag.java
@@ -0,0 +1,186 @@
+/* This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
+package org.onosproject.xran.codecs.ber;
+
+import java.io.EOFException;
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.Serializable;
+
+public class BerTag implements Serializable {
+
+    public static final int UNIVERSAL_CLASS = 0x00;
+    public static final int APPLICATION_CLASS = 0x40;
+    public static final int CONTEXT_CLASS = 0x80;
+    public static final int PRIVATE_CLASS = 0xc0;
+    public static final int PRIMITIVE = 0x00;
+    public static final int CONSTRUCTED = 0x20;
+    public static final int BOOLEAN_TAG = 1;
+    public static final int INTEGER_TAG = 2;
+    public static final int BIT_STRING_TAG = 3;
+    public static final int OCTET_STRING_TAG = 4;
+    public static final int NULL_TAG = 5;
+    public static final int OBJECT_IDENTIFIER_TAG = 6;
+    public static final int OBJECT_DESCRIPTOR_TAG = 7;
+    public static final int REAL_TAG = 9;
+    public static final int ENUMERATED_TAG = 10;
+    public static final int EMBEDDED_PDV_TAG = 11;
+    public static final int UTF8_STRING_TAG = 12;
+    public static final int TIME_TAG = 14;
+    public static final int NUMERIC_STRING_TAG = 18;
+    public static final int PRINTABLE_STRING_TAG = 19;
+    public static final int TELETEX_STRING_TAG = 20;
+    public static final int VIDEOTEX_STRING_TAG = 21;
+    public static final int IA5_STRING_TAG = 22;
+    public static final int UTC_TIME_TAG = 23;
+    public static final int GENERALIZED_TIME_TAG = 24;
+    public static final int GRAPHIC_STRING_TAG = 25;
+    public static final int VISIBLE_STRING_TAG = 26;
+    public static final int GENERAL_STRING_TAG = 27;
+    public static final int UNIVERSAL_STRING_TAG = 28;
+    public static final int BMP_STRING_TAG = 30;
+    public static final int DATE_TAG = 31;
+    public static final int TIME_OF_DAY_TAG = 32;
+    public static final int DATE_TIME_TAG = 33;
+    public static final int DURATION_TAG = 34;
+    private static final long serialVersionUID = 1L;
+    public byte[] tagBytes = null;
+    public int tagClass;
+    public int primitive;
+    public int tagNumber;
+
+    public BerTag(int identifierClass, int primitive, int tagNumber) {
+        this.tagClass = identifierClass;
+        this.primitive = primitive;
+        this.tagNumber = tagNumber;
+        code();
+    }
+
+    public BerTag() {
+    }
+
+    private void code() {
+        if (tagNumber < 31) {
+            tagBytes = new byte[1];
+            tagBytes[0] = (byte) (tagClass | primitive | tagNumber);
+        } else {
+            int tagLength = 1;
+            while (tagNumber > (Math.pow(2, (7 * tagLength)) - 1)) {
+                tagLength++;
+            }
+
+            tagBytes = new byte[1 + tagLength];
+            tagBytes[0] = (byte) (tagClass | primitive | 31);
+
+            for (int j = 1; j <= (tagLength - 1); j++) {
+                tagBytes[j] = (byte) (((tagNumber >> (7 * (tagLength - j))) & 0xff) | 0x80);
+            }
+
+            tagBytes[tagLength] = (byte) (tagNumber & 0x7f);
+
+        }
+    }
+
+    public int encode(BerByteArrayOutputStream os) throws IOException {
+        if (tagBytes == null) {
+            code();
+        }
+        for (int i = (tagBytes.length - 1); i >= 0; i--) {
+            os.write(tagBytes[i]);
+        }
+        return tagBytes.length;
+    }
+
+    public int decode(InputStream is) throws IOException {
+        int nextByte = is.read();
+        if (nextByte == -1) {
+            throw new EOFException("Unexpected end of input stream.");
+        }
+
+        tagClass = nextByte & 0xC0;
+        primitive = nextByte & 0x20;
+        tagNumber = nextByte & 0x1f;
+
+        int codeLength = 1;
+
+        if (tagNumber == 0x1f) {
+            tagNumber = 0;
+
+            int counter = 0;
+
+            do {
+                nextByte = is.read();
+                if (nextByte == -1) {
+                    throw new EOFException("Unexpected end of input stream.");
+                }
+
+                codeLength++;
+                if (counter >= 6) {
+                    throw new IOException("Invalid Tag");
+                }
+                tagNumber = tagNumber << 7;
+                tagNumber |= (nextByte & 0x7f);
+                counter++;
+            } while ((nextByte & 0x80) == 0x80);
+
+        }
+
+        return codeLength;
+    }
+
+    /**
+     * Decodes the Identifier from the ByteArrayInputStream and throws an Exception if it is not equal to itself.
+     * Returns the number of bytes read from the InputStream.
+     *
+     * @param is the input stream to read the identifier from.
+     * @return the length of the identifier read.
+     * @throws IOException if an exception occurs reading the identifier from the stream.
+     */
+    public int decodeAndCheck(InputStream is) throws IOException {
+
+        for (Byte identifierByte : tagBytes) {
+            int nextByte = is.read();
+            if (nextByte == -1) {
+                throw new EOFException("Unexpected end of input stream.");
+            }
+
+            if (nextByte != (identifierByte & 0xff)) {
+                throw new IOException("Identifier does not match!");
+            }
+        }
+        return tagBytes.length;
+    }
+
+    public boolean equals(int identifierClass, int primitive, int tagNumber) {
+        return (this.tagNumber == tagNumber && this.tagClass == identifierClass && this.primitive == primitive);
+    }
+
+    @Override
+    public boolean equals(Object obj) {
+        if (!(obj instanceof BerTag)) {
+            return false;
+        }
+        if (obj == this) {
+            return true;
+        }
+        BerTag berIdentifier = (BerTag) obj;
+        return (tagNumber == berIdentifier.tagNumber && tagClass == berIdentifier.tagClass
+                && primitive == berIdentifier.primitive);
+    }
+
+    @Override
+    public int hashCode() {
+        int hash = 17;
+        hash = hash * 31 + tagNumber;
+        hash = hash * 31 + tagClass;
+        hash = hash * 31 + primitive;
+        return hash;
+    }
+
+    @Override
+    public String toString() {
+        return "identifier class: " + tagClass + ", primitive: " + primitive + ", tag number: " + tagNumber;
+    }
+
+}
diff --git a/src/main/java/org.onosproject.xran/codecs/ber/internal/Util.java b/src/main/java/org.onosproject.xran/codecs/ber/internal/Util.java
new file mode 100644
index 0000000..c2d64cc
--- /dev/null
+++ b/src/main/java/org.onosproject.xran/codecs/ber/internal/Util.java
@@ -0,0 +1,28 @@
+/* This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
+package org.onosproject.xran.codecs.ber.internal;
+
+import java.io.EOFException;
+import java.io.IOException;
+import java.io.InputStream;
+
+public class Util {
+
+    public static void readFully(InputStream is, byte[] buffer) throws IOException {
+        readFully(is, buffer, 0, buffer.length);
+    }
+
+    public static void readFully(InputStream is, byte[] buffer, int off, int len) throws IOException {
+        do {
+            int bytesRead = is.read(buffer, off, len);
+            if (bytesRead == -1) {
+                throw new EOFException("Unexpected end of input stream.");
+            }
+
+            len -= bytesRead;
+            off += bytesRead;
+        } while (len > 0);
+    }
+
+}
diff --git a/src/main/java/org.onosproject.xran/codecs/ber/types/BerAny.java b/src/main/java/org.onosproject.xran/codecs/ber/types/BerAny.java
new file mode 100644
index 0000000..db5daee
--- /dev/null
+++ b/src/main/java/org.onosproject.xran/codecs/ber/types/BerAny.java
@@ -0,0 +1,75 @@
+/* This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
+package org.onosproject.xran.codecs.ber.types;
+
+import com.fasterxml.jackson.annotation.JsonValue;
+import org.onosproject.xran.codecs.ber.BerByteArrayOutputStream;
+import org.onosproject.xran.codecs.ber.BerLength;
+import org.onosproject.xran.codecs.ber.BerTag;
+import org.onosproject.xran.codecs.ber.internal.Util;
+import org.onosproject.xran.codecs.util.HexConverter;
+
+import javax.xml.bind.DatatypeConverter;
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.Serializable;
+
+public class BerAny implements Serializable {
+
+    private static final long serialVersionUID = 1L;
+
+    public byte[] value;
+
+    public BerAny() {
+    }
+
+    public BerAny(byte[] value) {
+        this.value = value;
+    }
+
+    public int encode(BerByteArrayOutputStream os) throws IOException {
+        os.write(value);
+        return value.length;
+    }
+
+    public int decode(InputStream is) throws IOException {
+
+        return decode(is, null);
+    }
+
+    public int decode(InputStream is, BerTag tag) throws IOException {
+
+        int decodedLength = 0;
+
+        int tagLength;
+
+        if (tag == null) {
+            tag = new BerTag();
+            tagLength = tag.decode(is);
+            decodedLength += tagLength;
+        } else {
+            tagLength = tag.encode(new BerByteArrayOutputStream(10));
+        }
+
+        BerLength lengthField = new BerLength();
+        int lengthLength = lengthField.decode(is);
+        decodedLength += lengthLength + lengthField.val;
+
+        value = new byte[tagLength + lengthLength + lengthField.val];
+
+        Util.readFully(is, value, tagLength + lengthLength, lengthField.val);
+        BerByteArrayOutputStream os = new BerByteArrayOutputStream(value, tagLength + lengthLength - 1);
+        BerLength.encodeLength(os, lengthField.val);
+        tag.encode(os);
+
+        return decodedLength;
+    }
+
+    @JsonValue
+    @Override
+    public String toString() {
+        return DatatypeConverter.printHexBinary(value);
+    }
+
+}
diff --git a/src/main/java/org.onosproject.xran/codecs/ber/types/BerBitString.java b/src/main/java/org.onosproject.xran/codecs/ber/types/BerBitString.java
new file mode 100644
index 0000000..9ebfe14
--- /dev/null
+++ b/src/main/java/org.onosproject.xran/codecs/ber/types/BerBitString.java
@@ -0,0 +1,131 @@
+/* This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
+package org.onosproject.xran.codecs.ber.types;
+
+import com.fasterxml.jackson.annotation.JsonIgnore;
+import com.fasterxml.jackson.annotation.JsonValue;
+import org.onosproject.xran.codecs.ber.BerByteArrayOutputStream;
+import org.onosproject.xran.codecs.ber.BerLength;
+import org.onosproject.xran.codecs.ber.BerTag;
+import org.onosproject.xran.codecs.ber.internal.Util;
+import org.onosproject.xran.codecs.util.HexConverter;
+
+import javax.xml.bind.DatatypeConverter;
+import java.io.EOFException;
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.Serializable;
+
+public class BerBitString implements Serializable {
+
+    public final static BerTag tag = new BerTag(BerTag.UNIVERSAL_CLASS, BerTag.PRIMITIVE, BerTag.BIT_STRING_TAG);
+    private static final long serialVersionUID = 1L;
+    @JsonIgnore
+    public byte[] code = null;
+
+    public byte[] value;
+    public int numBits;
+
+    public BerBitString() {
+    }
+
+    public BerBitString(byte[] value, int numBits) {
+
+        if (value == null) {
+            throw new NullPointerException("value cannot be null");
+        }
+        if (numBits < 0) {
+            throw new IllegalArgumentException("numBits cannot be negative.");
+        }
+        if (numBits > (value.length * 8)) {
+            throw new IllegalArgumentException("'value' is too short to hold all bits.");
+        }
+
+        this.value = value;
+        this.numBits = numBits;
+
+    }
+
+    public BerBitString(byte[] code) {
+        this.code = code;
+    }
+
+    public int encode(BerByteArrayOutputStream os) throws IOException {
+        return encode(os, true);
+    }
+
+    public int encode(BerByteArrayOutputStream os, boolean withTag) throws IOException {
+
+        if (code != null) {
+            for (int i = code.length - 1; i >= 0; i--) {
+                os.write(code[i]);
+            }
+            if (withTag) {
+                return tag.encode(os) + code.length;
+            }
+            return code.length;
+        }
+
+        for (int i = (value.length - 1); i >= 0; i--) {
+            os.write(value[i]);
+        }
+        os.write(value.length * 8 - numBits);
+
+        int codeLength = value.length + 1;
+
+        codeLength += BerLength.encodeLength(os, codeLength);
+
+        if (withTag) {
+            codeLength += tag.encode(os);
+        }
+
+        return codeLength;
+    }
+
+    public int decode(InputStream is) throws IOException {
+        return decode(is, true);
+    }
+
+    public int decode(InputStream is, boolean withTag) throws IOException {
+        // could be encoded in primitiv and constructed mode
+        // only primitiv mode is implemented
+
+        int codeLength = 0;
+
+        if (withTag) {
+            codeLength += tag.decodeAndCheck(is);
+        }
+
+        BerLength length = new BerLength();
+        codeLength += length.decode(is);
+
+        value = new byte[length.val - 1];
+
+        int unusedBits = is.read();
+        if (unusedBits == -1) {
+            throw new EOFException("Unexpected end of input stream.");
+        }
+        if (unusedBits > 7) {
+            throw new IOException(
+                    "Number of unused bits in bit string expected to be less than 8 but is: " + unusedBits);
+        }
+
+        numBits = (value.length * 8) - unusedBits;
+
+        if (value.length > 0) {
+            Util.readFully(is, value);
+        }
+
+        codeLength += value.length + 1;
+
+        return codeLength;
+
+    }
+
+    @JsonValue
+    @Override
+    public String toString() {
+        return DatatypeConverter.printHexBinary(value);
+    }
+}
diff --git a/src/main/java/org.onosproject.xran/codecs/ber/types/BerBoolean.java b/src/main/java/org.onosproject.xran/codecs/ber/types/BerBoolean.java
new file mode 100644
index 0000000..14e4e5b
--- /dev/null
+++ b/src/main/java/org.onosproject.xran/codecs/ber/types/BerBoolean.java
@@ -0,0 +1,115 @@
+/* This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
+package org.onosproject.xran.codecs.ber.types;
+
+import com.fasterxml.jackson.annotation.JsonIgnore;
+import com.fasterxml.jackson.annotation.JsonValue;
+import org.onosproject.xran.codecs.ber.BerByteArrayOutputStream;
+import org.onosproject.xran.codecs.ber.BerLength;
+import org.onosproject.xran.codecs.ber.BerTag;
+
+import java.io.EOFException;
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.Serializable;
+
+public class BerBoolean implements Serializable {
+
+    public final static BerTag tag = new BerTag(BerTag.UNIVERSAL_CLASS, BerTag.PRIMITIVE, BerTag.BOOLEAN_TAG);
+    private static final long serialVersionUID = 1L;
+    @JsonIgnore
+    public byte[] code = null;
+
+    public boolean value;
+
+    public BerBoolean() {
+    }
+
+    public BerBoolean(byte[] code) {
+        this.code = code;
+    }
+
+    public BerBoolean(boolean value) {
+        this.value = value;
+    }
+
+    public int encode(BerByteArrayOutputStream os) throws IOException {
+        return encode(os, true);
+    }
+
+    public int encode(BerByteArrayOutputStream os, boolean withTag) throws IOException {
+
+        if (code != null) {
+            for (int i = code.length - 1; i >= 0; i--) {
+                os.write(code[i]);
+            }
+            if (withTag) {
+                return tag.encode(os) + code.length;
+            }
+            return code.length;
+        }
+
+        int codeLength = 1;
+
+        if (value) {
+            os.write(0xff);
+        } else {
+            os.write(0);
+        }
+
+        codeLength += BerLength.encodeLength(os, codeLength);
+
+        if (withTag) {
+            codeLength += tag.encode(os);
+        }
+
+        return codeLength;
+    }
+
+    public int decode(InputStream is) throws IOException {
+        return decode(is, true);
+    }
+
+    public int decode(InputStream is, boolean withTag) throws IOException {
+
+        int codeLength = 0;
+
+        if (withTag) {
+            codeLength += tag.decodeAndCheck(is);
+        }
+
+        BerLength length = new BerLength();
+        codeLength += length.decode(is);
+
+        if (length.val != 1) {
+            throw new IOException("Decoded length of BerBoolean is not correct");
+        }
+
+        int nextByte = is.read();
+        if (nextByte == -1) {
+            throw new EOFException("Unexpected end of input stream.");
+        }
+
+        codeLength++;
+        if (nextByte == 0) {
+            value = false;
+        } else {
+            value = true;
+        }
+
+        return codeLength;
+    }
+
+    public void encodeAndSave(int encodingSizeGuess) throws IOException {
+        BerByteArrayOutputStream os = new BerByteArrayOutputStream(encodingSizeGuess);
+        encode(os, false);
+        code = os.getArray();
+    }
+
+    @JsonValue
+    @Override
+    public String toString() {
+        return "" + value;
+    }
+}
diff --git a/src/main/java/org.onosproject.xran/codecs/ber/types/BerDate.java b/src/main/java/org.onosproject.xran/codecs/ber/types/BerDate.java
new file mode 100644
index 0000000..e6c3362
--- /dev/null
+++ b/src/main/java/org.onosproject.xran/codecs/ber/types/BerDate.java
@@ -0,0 +1,55 @@
+/* This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
+package org.onosproject.xran.codecs.ber.types;
+
+import org.onosproject.xran.codecs.ber.BerByteArrayOutputStream;
+import org.onosproject.xran.codecs.ber.BerTag;
+
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.UnsupportedEncodingException;
+
+public class BerDate extends BerTime {
+
+    public final static BerTag tag = new BerTag(BerTag.UNIVERSAL_CLASS, BerTag.PRIMITIVE, BerTag.DATE_TAG);
+    private static final long serialVersionUID = 1L;
+
+    public BerDate() {
+    }
+
+    public BerDate(byte[] value) {
+        super(value);
+    }
+
+    public BerDate(String valueAsString) throws UnsupportedEncodingException {
+        super(valueAsString);
+    }
+
+    @Override
+    public int encode(BerByteArrayOutputStream os, boolean withTag) throws IOException {
+
+        int codeLength = super.encode(os, false);
+
+        if (withTag) {
+            codeLength += tag.encode(os);
+        }
+
+        return codeLength;
+    }
+
+    @Override
+    public int decode(InputStream is, boolean withTag) throws IOException {
+
+        int codeLength = 0;
+
+        if (withTag) {
+            codeLength += tag.decodeAndCheck(is);
+        }
+
+        codeLength += super.decode(is, false);
+
+        return codeLength;
+    }
+
+}
diff --git a/src/main/java/org.onosproject.xran/codecs/ber/types/BerDateTime.java b/src/main/java/org.onosproject.xran/codecs/ber/types/BerDateTime.java
new file mode 100644
index 0000000..7196707
--- /dev/null
+++ b/src/main/java/org.onosproject.xran/codecs/ber/types/BerDateTime.java
@@ -0,0 +1,55 @@
+/* This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
+package org.onosproject.xran.codecs.ber.types;
+
+import org.onosproject.xran.codecs.ber.BerByteArrayOutputStream;
+import org.onosproject.xran.codecs.ber.BerTag;
+
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.UnsupportedEncodingException;
+
+public class BerDateTime extends BerTime {
+
+    public final static BerTag tag = new BerTag(BerTag.UNIVERSAL_CLASS, BerTag.PRIMITIVE, BerTag.DATE_TIME_TAG);
+    private static final long serialVersionUID = 1L;
+
+    public BerDateTime() {
+    }
+
+    public BerDateTime(byte[] value) {
+        super(value);
+    }
+
+    public BerDateTime(String valueAsString) throws UnsupportedEncodingException {
+        super(valueAsString);
+    }
+
+    @Override
+    public int encode(BerByteArrayOutputStream os, boolean withTag) throws IOException {
+
+        int codeLength = super.encode(os, false);
+
+        if (withTag) {
+            codeLength += tag.encode(os);
+        }
+
+        return codeLength;
+    }
+
+    @Override
+    public int decode(InputStream is, boolean withTag) throws IOException {
+
+        int codeLength = 0;
+
+        if (withTag) {
+            codeLength += tag.decodeAndCheck(is);
+        }
+
+        codeLength += super.decode(is, false);
+
+        return codeLength;
+    }
+
+}
diff --git a/src/main/java/org.onosproject.xran/codecs/ber/types/BerDuration.java b/src/main/java/org.onosproject.xran/codecs/ber/types/BerDuration.java
new file mode 100644
index 0000000..6203472
--- /dev/null
+++ b/src/main/java/org.onosproject.xran/codecs/ber/types/BerDuration.java
@@ -0,0 +1,55 @@
+/* This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
+package org.onosproject.xran.codecs.ber.types;
+
+import org.onosproject.xran.codecs.ber.BerByteArrayOutputStream;
+import org.onosproject.xran.codecs.ber.BerTag;
+
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.UnsupportedEncodingException;
+
+public class BerDuration extends BerTime {
+
+    public final static BerTag tag = new BerTag(BerTag.UNIVERSAL_CLASS, BerTag.PRIMITIVE, BerTag.DURATION_TAG);
+    private static final long serialVersionUID = 1L;
+
+    public BerDuration() {
+    }
+
+    public BerDuration(byte[] value) {
+        super(value);
+    }
+
+    public BerDuration(String valueAsString) throws UnsupportedEncodingException {
+        super(valueAsString);
+    }
+
+    @Override
+    public int encode(BerByteArrayOutputStream os, boolean withTag) throws IOException {
+
+        int codeLength = super.encode(os, false);
+
+        if (withTag) {
+            codeLength += tag.encode(os);
+        }
+
+        return codeLength;
+    }
+
+    @Override
+    public int decode(InputStream is, boolean withTag) throws IOException {
+
+        int codeLength = 0;
+
+        if (withTag) {
+            codeLength += tag.decodeAndCheck(is);
+        }
+
+        codeLength += super.decode(is, false);
+
+        return codeLength;
+    }
+
+}
diff --git a/src/main/java/org.onosproject.xran/codecs/ber/types/BerEmbeddedPdv.java b/src/main/java/org.onosproject.xran/codecs/ber/types/BerEmbeddedPdv.java
new file mode 100644
index 0000000..e9bc9af
--- /dev/null
+++ b/src/main/java/org.onosproject.xran/codecs/ber/types/BerEmbeddedPdv.java
@@ -0,0 +1,747 @@
+/**
+ * This class file was automatically generated by jASN1 v1.7.2-SNAPSHOT (http://www.openmuc.org)
+ */
+
+package org.onosproject.xran.codecs.ber.types;
+
+import com.fasterxml.jackson.annotation.JsonIgnore;
+import com.fasterxml.jackson.annotation.JsonValue;
+import org.onosproject.xran.codecs.ber.BerByteArrayOutputStream;
+import org.onosproject.xran.codecs.ber.BerLength;
+import org.onosproject.xran.codecs.ber.BerTag;
+import org.onosproject.xran.codecs.ber.types.string.BerObjectDescriptor;
+
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.Serializable;
+
+public class BerEmbeddedPdv implements Serializable {
+
+    public static final BerTag tag = new BerTag(BerTag.UNIVERSAL_CLASS, BerTag.CONSTRUCTED, 11);
+    private static final long serialVersionUID = 1L;
+    @JsonIgnore public byte[] code = null;
+    private Identification identification = null;
+    private BerObjectDescriptor dataValueDescriptor = null;
+    private BerOctetString dataValue = null;
+    public BerEmbeddedPdv() {
+    }
+
+    public BerEmbeddedPdv(byte[] code) {
+        this.code = code;
+    }
+
+    public Identification getIdentification() {
+        return identification;
+    }
+
+    public void setIdentification(Identification identification) {
+        this.identification = identification;
+    }
+
+    public BerObjectDescriptor getDataValueDescriptor() {
+        return dataValueDescriptor;
+    }
+
+    public void setDataValueDescriptor(BerObjectDescriptor dataValueDescriptor) {
+        this.dataValueDescriptor = dataValueDescriptor;
+    }
+
+    public BerOctetString getDataValue() {
+        return dataValue;
+    }
+
+    public void setDataValue(BerOctetString dataValue) {
+        this.dataValue = dataValue;
+    }
+
+    public int encode(BerByteArrayOutputStream os) throws IOException {
+        return encode(os, true);
+    }
+
+    public int encode(BerByteArrayOutputStream os, boolean withTag) throws IOException {
+
+        if (code != null) {
+            for (int i = code.length - 1; i >= 0; i--) {
+                os.write(code[i]);
+            }
+            if (withTag) {
+                return tag.encode(os) + code.length;
+            }
+            return code.length;
+        }
+
+        int codeLength = 0;
+        int sublength;
+
+        codeLength += dataValue.encode(os, false);
+        // write tag: CONTEXT_CLASS, PRIMITIVE, 2
+        os.write(0x82);
+        codeLength += 1;
+
+        if (dataValueDescriptor != null) {
+            codeLength += dataValueDescriptor.encode(os, false);
+            // write tag: CONTEXT_CLASS, PRIMITIVE, 1
+            os.write(0x81);
+            codeLength += 1;
+        }
+
+        sublength = identification.encode(os);
+        codeLength += sublength;
+        codeLength += BerLength.encodeLength(os, sublength);
+        // write tag: CONTEXT_CLASS, CONSTRUCTED, 0
+        os.write(0xA0);
+        codeLength += 1;
+
+        codeLength += BerLength.encodeLength(os, codeLength);
+
+        if (withTag) {
+            codeLength += tag.encode(os);
+        }
+
+        return codeLength;
+
+    }
+
+    public int decode(InputStream is) throws IOException {
+        return decode(is, true);
+    }
+
+    public int decode(InputStream is, boolean withTag) throws IOException {
+        int codeLength = 0;
+        int subCodeLength = 0;
+        BerTag berTag = new BerTag();
+
+        if (withTag) {
+            codeLength += tag.decodeAndCheck(is);
+        }
+
+        BerLength length = new BerLength();
+        codeLength += length.decode(is);
+
+        int totalLength = length.val;
+        codeLength += totalLength;
+
+        subCodeLength += berTag.decode(is);
+        if (berTag.equals(BerTag.CONTEXT_CLASS, BerTag.CONSTRUCTED, 0)) {
+            subCodeLength += length.decode(is);
+            identification = new Identification();
+            subCodeLength += identification.decode(is, null);
+            subCodeLength += berTag.decode(is);
+        } else {
+            throw new IOException("Tag does not match the mandatory sequence element tag.");
+        }
+
+        if (berTag.equals(BerTag.CONTEXT_CLASS, BerTag.PRIMITIVE, 1)) {
+            dataValueDescriptor = new BerObjectDescriptor();
+            subCodeLength += dataValueDescriptor.decode(is, false);
+            subCodeLength += berTag.decode(is);
+        }
+
+        if (berTag.equals(BerTag.CONTEXT_CLASS, BerTag.PRIMITIVE, 2)) {
+            dataValue = new BerOctetString();
+            subCodeLength += dataValue.decode(is, false);
+            if (subCodeLength == totalLength) {
+                return codeLength;
+            }
+        }
+        throw new IOException("Unexpected end of sequence, length tag: " + totalLength + ", actual sequence length: "
+                + subCodeLength);
+
+    }
+
+    public void encodeAndSave(int encodingSizeGuess) throws IOException {
+        BerByteArrayOutputStream os = new BerByteArrayOutputStream(encodingSizeGuess);
+        encode(os, false);
+        code = os.getArray();
+    }
+
+    @JsonValue
+    @Override
+    public String toString() {
+        StringBuilder sb = new StringBuilder();
+        appendAsString(sb, 0);
+        return sb.toString();
+    }
+
+    public void appendAsString(StringBuilder sb, int indentLevel) {
+
+        sb.append("{");
+        sb.append("\n");
+        for (int i = 0; i < indentLevel + 1; i++) {
+            sb.append("\t");
+        }
+        if (identification != null) {
+            sb.append("identification: ");
+            identification.appendAsString(sb, indentLevel + 1);
+        } else {
+            sb.append("identification: <empty-required-field>");
+        }
+
+        if (dataValueDescriptor != null) {
+            sb.append(",\n");
+            for (int i = 0; i < indentLevel + 1; i++) {
+                sb.append("\t");
+            }
+            sb.append("dataValueDescriptor: ").append(dataValueDescriptor);
+        }
+
+        sb.append(",\n");
+        for (int i = 0; i < indentLevel + 1; i++) {
+            sb.append("\t");
+        }
+        if (dataValue != null) {
+            sb.append("dataValue: ").append(dataValue);
+        } else {
+            sb.append("dataValue: <empty-required-field>");
+        }
+
+        sb.append("\n");
+        for (int i = 0; i < indentLevel; i++) {
+            sb.append("\t");
+        }
+        sb.append("}");
+    }
+
+    public static class Identification implements Serializable {
+
+        private static final long serialVersionUID = 1L;
+
+        @JsonIgnore
+        public byte[] code = null;
+        private Syntaxes syntaxes = null;
+        private BerObjectIdentifier syntax = null;
+        private BerInteger presentationContextId = null;
+        private ContextNegotiation contextNegotiation = null;
+        private BerObjectIdentifier transferSyntax = null;
+        private BerNull fixed = null;
+        public Identification() {
+        }
+        public Identification(byte[] code) {
+            this.code = code;
+        }
+
+        public Syntaxes getSyntaxes() {
+            return syntaxes;
+        }
+
+        public void setSyntaxes(Syntaxes syntaxes) {
+            this.syntaxes = syntaxes;
+        }
+
+        public BerObjectIdentifier getSyntax() {
+            return syntax;
+        }
+
+        public void setSyntax(BerObjectIdentifier syntax) {
+            this.syntax = syntax;
+        }
+
+        public BerInteger getPresentationContextId() {
+            return presentationContextId;
+        }
+
+        public void setPresentationContextId(BerInteger presentationContextId) {
+            this.presentationContextId = presentationContextId;
+        }
+
+        public ContextNegotiation getContextNegotiation() {
+            return contextNegotiation;
+        }
+
+        public void setContextNegotiation(ContextNegotiation contextNegotiation) {
+            this.contextNegotiation = contextNegotiation;
+        }
+
+        public BerObjectIdentifier getTransferSyntax() {
+            return transferSyntax;
+        }
+
+        public void setTransferSyntax(BerObjectIdentifier transferSyntax) {
+            this.transferSyntax = transferSyntax;
+        }
+
+        public BerNull getFixed() {
+            return fixed;
+        }
+
+        public void setFixed(BerNull fixed) {
+            this.fixed = fixed;
+        }
+
+        public int encode(BerByteArrayOutputStream os) throws IOException {
+
+            if (code != null) {
+                for (int i = code.length - 1; i >= 0; i--) {
+                    os.write(code[i]);
+                }
+                return code.length;
+            }
+
+            int codeLength = 0;
+            if (fixed != null) {
+                codeLength += fixed.encode(os, false);
+                // write tag: CONTEXT_CLASS, PRIMITIVE, 5
+                os.write(0x85);
+                codeLength += 1;
+                return codeLength;
+            }
+
+            if (transferSyntax != null) {
+                codeLength += transferSyntax.encode(os, false);
+                // write tag: CONTEXT_CLASS, PRIMITIVE, 4
+                os.write(0x84);
+                codeLength += 1;
+                return codeLength;
+            }
+
+            if (contextNegotiation != null) {
+                codeLength += contextNegotiation.encode(os, false);
+                // write tag: CONTEXT_CLASS, CONSTRUCTED, 3
+                os.write(0xA3);
+                codeLength += 1;
+                return codeLength;
+            }
+
+            if (presentationContextId != null) {
+                codeLength += presentationContextId.encode(os, false);
+                // write tag: CONTEXT_CLASS, PRIMITIVE, 2
+                os.write(0x82);
+                codeLength += 1;
+                return codeLength;
+            }
+
+            if (syntax != null) {
+                codeLength += syntax.encode(os, false);
+                // write tag: CONTEXT_CLASS, PRIMITIVE, 1
+                os.write(0x81);
+                codeLength += 1;
+                return codeLength;
+            }
+
+            if (syntaxes != null) {
+                codeLength += syntaxes.encode(os, false);
+                // write tag: CONTEXT_CLASS, CONSTRUCTED, 0
+                os.write(0xA0);
+                codeLength += 1;
+                return codeLength;
+            }
+
+            throw new IOException("Error encoding CHOICE: No element of CHOICE was selected.");
+        }
+
+        public int decode(InputStream is) throws IOException {
+            return decode(is, null);
+        }
+
+        public int decode(InputStream is, BerTag berTag) throws IOException {
+
+            int codeLength = 0;
+            BerTag passedTag = berTag;
+
+            if (berTag == null) {
+                berTag = new BerTag();
+                codeLength += berTag.decode(is);
+            }
+
+            if (berTag.equals(BerTag.CONTEXT_CLASS, BerTag.CONSTRUCTED, 0)) {
+                syntaxes = new Syntaxes();
+                codeLength += syntaxes.decode(is, false);
+                return codeLength;
+            }
+
+            if (berTag.equals(BerTag.CONTEXT_CLASS, BerTag.PRIMITIVE, 1)) {
+                syntax = new BerObjectIdentifier();
+                codeLength += syntax.decode(is, false);
+                return codeLength;
+            }
+
+            if (berTag.equals(BerTag.CONTEXT_CLASS, BerTag.PRIMITIVE, 2)) {
+                presentationContextId = new BerInteger();
+                codeLength += presentationContextId.decode(is, false);
+                return codeLength;
+            }
+
+            if (berTag.equals(BerTag.CONTEXT_CLASS, BerTag.CONSTRUCTED, 3)) {
+                contextNegotiation = new ContextNegotiation();
+                codeLength += contextNegotiation.decode(is, false);
+                return codeLength;
+            }
+
+            if (berTag.equals(BerTag.CONTEXT_CLASS, BerTag.PRIMITIVE, 4)) {
+                transferSyntax = new BerObjectIdentifier();
+                codeLength += transferSyntax.decode(is, false);
+                return codeLength;
+            }
+
+            if (berTag.equals(BerTag.CONTEXT_CLASS, BerTag.PRIMITIVE, 5)) {
+                fixed = new BerNull();
+                codeLength += fixed.decode(is, false);
+                return codeLength;
+            }
+
+            if (passedTag != null) {
+                return 0;
+            }
+
+            throw new IOException("Error decoding CHOICE: Tag " + berTag + " matched to no item.");
+        }
+
+        public void encodeAndSave(int encodingSizeGuess) throws IOException {
+            BerByteArrayOutputStream os = new BerByteArrayOutputStream(encodingSizeGuess);
+            encode(os);
+            code = os.getArray();
+        }
+
+        @Override
+        public String toString() {
+            StringBuilder sb = new StringBuilder();
+            appendAsString(sb, 0);
+            return sb.toString();
+        }
+
+        public void appendAsString(StringBuilder sb, int indentLevel) {
+
+            if (syntaxes != null) {
+                sb.append("syntaxes: ");
+                syntaxes.appendAsString(sb, indentLevel + 1);
+                return;
+            }
+
+            if (syntax != null) {
+                sb.append("syntax: ").append(syntax);
+                return;
+            }
+
+            if (presentationContextId != null) {
+                sb.append("presentationContextId: ").append(presentationContextId);
+                return;
+            }
+
+            if (contextNegotiation != null) {
+                sb.append("contextNegotiation: ");
+                contextNegotiation.appendAsString(sb, indentLevel + 1);
+                return;
+            }
+
+            if (transferSyntax != null) {
+                sb.append("transferSyntax: ").append(transferSyntax);
+                return;
+            }
+
+            if (fixed != null) {
+                sb.append("fixed: ").append(fixed);
+                return;
+            }
+
+            sb.append("<none>");
+        }
+
+        public static class Syntaxes implements Serializable {
+
+            public static final BerTag tag = new BerTag(BerTag.UNIVERSAL_CLASS, BerTag.CONSTRUCTED, 16);
+            private static final long serialVersionUID = 1L;
+            @JsonIgnore public byte[] code = null;
+            private BerObjectIdentifier abstract_ = null;
+            private BerObjectIdentifier transfer = null;
+
+            public Syntaxes() {
+            }
+
+            public Syntaxes(byte[] code) {
+                this.code = code;
+            }
+
+            public BerObjectIdentifier getAbstract() {
+                return abstract_;
+            }
+
+            public void setAbstract(BerObjectIdentifier abstract_) {
+                this.abstract_ = abstract_;
+            }
+
+            public BerObjectIdentifier getTransfer() {
+                return transfer;
+            }
+
+            public void setTransfer(BerObjectIdentifier transfer) {
+                this.transfer = transfer;
+            }
+
+            public int encode(BerByteArrayOutputStream os) throws IOException {
+                return encode(os, true);
+            }
+
+            public int encode(BerByteArrayOutputStream os, boolean withTag) throws IOException {
+
+                if (code != null) {
+                    for (int i = code.length - 1; i >= 0; i--) {
+                        os.write(code[i]);
+                    }
+                    if (withTag) {
+                        return tag.encode(os) + code.length;
+                    }
+                    return code.length;
+                }
+
+                int codeLength = 0;
+                codeLength += transfer.encode(os, false);
+                // write tag: CONTEXT_CLASS, PRIMITIVE, 1
+                os.write(0x81);
+                codeLength += 1;
+
+                codeLength += abstract_.encode(os, false);
+                // write tag: CONTEXT_CLASS, PRIMITIVE, 0
+                os.write(0x80);
+                codeLength += 1;
+
+                codeLength += BerLength.encodeLength(os, codeLength);
+
+                if (withTag) {
+                    codeLength += tag.encode(os);
+                }
+
+                return codeLength;
+
+            }
+
+            public int decode(InputStream is) throws IOException {
+                return decode(is, true);
+            }
+
+            public int decode(InputStream is, boolean withTag) throws IOException {
+                int codeLength = 0;
+                int subCodeLength = 0;
+                BerTag berTag = new BerTag();
+
+                if (withTag) {
+                    codeLength += tag.decodeAndCheck(is);
+                }
+
+                BerLength length = new BerLength();
+                codeLength += length.decode(is);
+
+                int totalLength = length.val;
+                codeLength += totalLength;
+
+                subCodeLength += berTag.decode(is);
+                if (berTag.equals(BerTag.CONTEXT_CLASS, BerTag.PRIMITIVE, 0)) {
+                    abstract_ = new BerObjectIdentifier();
+                    subCodeLength += abstract_.decode(is, false);
+                    subCodeLength += berTag.decode(is);
+                } else {
+                    throw new IOException("Tag does not match the mandatory sequence element tag.");
+                }
+
+                if (berTag.equals(BerTag.CONTEXT_CLASS, BerTag.PRIMITIVE, 1)) {
+                    transfer = new BerObjectIdentifier();
+                    subCodeLength += transfer.decode(is, false);
+                    if (subCodeLength == totalLength) {
+                        return codeLength;
+                    }
+                }
+                throw new IOException("Unexpected end of sequence, length tag: " + totalLength
+                        + ", actual sequence length: " + subCodeLength);
+
+            }
+
+            public void encodeAndSave(int encodingSizeGuess) throws IOException {
+                BerByteArrayOutputStream os = new BerByteArrayOutputStream(encodingSizeGuess);
+                encode(os, false);
+                code = os.getArray();
+            }
+
+            @Override
+            public String toString() {
+                StringBuilder sb = new StringBuilder();
+                appendAsString(sb, 0);
+                return sb.toString();
+            }
+
+            public void appendAsString(StringBuilder sb, int indentLevel) {
+
+                sb.append("{");
+                sb.append("\n");
+                for (int i = 0; i < indentLevel + 1; i++) {
+                    sb.append("\t");
+                }
+                if (abstract_ != null) {
+                    sb.append("abstract_: ").append(abstract_);
+                } else {
+                    sb.append("abstract_: <empty-required-field>");
+                }
+
+                sb.append(",\n");
+                for (int i = 0; i < indentLevel + 1; i++) {
+                    sb.append("\t");
+                }
+                if (transfer != null) {
+                    sb.append("transfer: ").append(transfer);
+                } else {
+                    sb.append("transfer: <empty-required-field>");
+                }
+
+                sb.append("\n");
+                for (int i = 0; i < indentLevel; i++) {
+                    sb.append("\t");
+                }
+                sb.append("}");
+            }
+
+        }
+
+        public static class ContextNegotiation implements Serializable {
+
+            public static final BerTag tag = new BerTag(BerTag.UNIVERSAL_CLASS, BerTag.CONSTRUCTED, 16);
+            private static final long serialVersionUID = 1L;
+            @JsonIgnore public byte[] code = null;
+            private BerInteger presentationContextId = null;
+            private BerObjectIdentifier transferSyntax = null;
+
+            public ContextNegotiation() {
+            }
+
+            public ContextNegotiation(byte[] code) {
+                this.code = code;
+            }
+
+            public BerInteger getPresentationContextId() {
+                return presentationContextId;
+            }
+
+            public void setPresentationContextId(BerInteger presentationContextId) {
+                this.presentationContextId = presentationContextId;
+            }
+
+            public BerObjectIdentifier getTransferSyntax() {
+                return transferSyntax;
+            }
+
+            public void setTransferSyntax(BerObjectIdentifier transferSyntax) {
+                this.transferSyntax = transferSyntax;
+            }
+
+            public int encode(BerByteArrayOutputStream os) throws IOException {
+                return encode(os, true);
+            }
+
+            public int encode(BerByteArrayOutputStream os, boolean withTag) throws IOException {
+
+                if (code != null) {
+                    for (int i = code.length - 1; i >= 0; i--) {
+                        os.write(code[i]);
+                    }
+                    if (withTag) {
+                        return tag.encode(os) + code.length;
+                    }
+                    return code.length;
+                }
+
+                int codeLength = 0;
+                codeLength += transferSyntax.encode(os, false);
+                // write tag: CONTEXT_CLASS, PRIMITIVE, 1
+                os.write(0x81);
+                codeLength += 1;
+
+                codeLength += presentationContextId.encode(os, false);
+                // write tag: CONTEXT_CLASS, PRIMITIVE, 0
+                os.write(0x80);
+                codeLength += 1;
+
+                codeLength += BerLength.encodeLength(os, codeLength);
+
+                if (withTag) {
+                    codeLength += tag.encode(os);
+                }
+
+                return codeLength;
+
+            }
+
+            public int decode(InputStream is) throws IOException {
+                return decode(is, true);
+            }
+
+            public int decode(InputStream is, boolean withTag) throws IOException {
+                int codeLength = 0;
+                int subCodeLength = 0;
+                BerTag berTag = new BerTag();
+
+                if (withTag) {
+                    codeLength += tag.decodeAndCheck(is);
+                }
+
+                BerLength length = new BerLength();
+                codeLength += length.decode(is);
+
+                int totalLength = length.val;
+                codeLength += totalLength;
+
+                subCodeLength += berTag.decode(is);
+                if (berTag.equals(BerTag.CONTEXT_CLASS, BerTag.PRIMITIVE, 0)) {
+                    presentationContextId = new BerInteger();
+                    subCodeLength += presentationContextId.decode(is, false);
+                    subCodeLength += berTag.decode(is);
+                } else {
+                    throw new IOException("Tag does not match the mandatory sequence element tag.");
+                }
+
+                if (berTag.equals(BerTag.CONTEXT_CLASS, BerTag.PRIMITIVE, 1)) {
+                    transferSyntax = new BerObjectIdentifier();
+                    subCodeLength += transferSyntax.decode(is, false);
+                    if (subCodeLength == totalLength) {
+                        return codeLength;
+                    }
+                }
+                throw new IOException("Unexpected end of sequence, length tag: " + totalLength
+                        + ", actual sequence length: " + subCodeLength);
+
+            }
+
+            public void encodeAndSave(int encodingSizeGuess) throws IOException {
+                BerByteArrayOutputStream os = new BerByteArrayOutputStream(encodingSizeGuess);
+                encode(os, false);
+                code = os.getArray();
+            }
+
+            @Override
+            public String toString() {
+                StringBuilder sb = new StringBuilder();
+                appendAsString(sb, 0);
+                return sb.toString();
+            }
+
+            public void appendAsString(StringBuilder sb, int indentLevel) {
+
+                sb.append("{");
+                sb.append("\n");
+                for (int i = 0; i < indentLevel + 1; i++) {
+                    sb.append("\t");
+                }
+                if (presentationContextId != null) {
+                    sb.append("presentationContextId: ").append(presentationContextId);
+                } else {
+                    sb.append("presentationContextId: <empty-required-field>");
+                }
+
+                sb.append(",\n");
+                for (int i = 0; i < indentLevel + 1; i++) {
+                    sb.append("\t");
+                }
+                if (transferSyntax != null) {
+                    sb.append("transferSyntax: ").append(transferSyntax);
+                } else {
+                    sb.append("transferSyntax: <empty-required-field>");
+                }
+
+                sb.append("\n");
+                for (int i = 0; i < indentLevel; i++) {
+                    sb.append("\t");
+                }
+                sb.append("}");
+            }
+
+        }
+
+    }
+
+}
diff --git a/src/main/java/org.onosproject.xran/codecs/ber/types/BerEnum.java b/src/main/java/org.onosproject.xran/codecs/ber/types/BerEnum.java
new file mode 100644
index 0000000..ea97be5
--- /dev/null
+++ b/src/main/java/org.onosproject.xran/codecs/ber/types/BerEnum.java
@@ -0,0 +1,59 @@
+/* This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
+package org.onosproject.xran.codecs.ber.types;
+
+import org.onosproject.xran.codecs.ber.BerByteArrayOutputStream;
+import org.onosproject.xran.codecs.ber.BerTag;
+
+import java.io.IOException;
+import java.io.InputStream;
+import java.math.BigInteger;
+
+public class BerEnum extends BerInteger {
+
+    public final static BerTag tag = new BerTag(BerTag.UNIVERSAL_CLASS, BerTag.PRIMITIVE, BerTag.ENUMERATED_TAG);
+    private static final long serialVersionUID = 1L;
+
+    public BerEnum() {
+    }
+
+    public BerEnum(byte[] code) {
+        this.code = code;
+    }
+
+    public BerEnum(BigInteger val) {
+        this.value = val;
+    }
+
+    public BerEnum(long val) {
+        this.value = BigInteger.valueOf(val);
+    }
+
+    @Override
+    public int encode(BerByteArrayOutputStream os, boolean withTag) throws IOException {
+
+        int codeLength = super.encode(os, false);
+
+        if (withTag) {
+            codeLength += tag.encode(os);
+        }
+
+        return codeLength;
+    }
+
+    @Override
+    public int decode(InputStream is, boolean withTag) throws IOException {
+
+        int codeLength = 0;
+
+        if (withTag) {
+            codeLength += tag.decodeAndCheck(is);
+        }
+
+        codeLength += super.decode(is, false);
+
+        return codeLength;
+    }
+
+}
diff --git a/src/main/java/org.onosproject.xran/codecs/ber/types/BerGeneralizedTime.java b/src/main/java/org.onosproject.xran/codecs/ber/types/BerGeneralizedTime.java
new file mode 100644
index 0000000..00f3340
--- /dev/null
+++ b/src/main/java/org.onosproject.xran/codecs/ber/types/BerGeneralizedTime.java
@@ -0,0 +1,133 @@
+/* This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
+package org.onosproject.xran.codecs.ber.types;
+
+import org.onosproject.xran.codecs.ber.BerByteArrayOutputStream;
+import org.onosproject.xran.codecs.ber.BerTag;
+import org.onosproject.xran.codecs.ber.types.string.BerVisibleString;
+
+import java.io.IOException;
+import java.io.InputStream;
+import java.text.ParseException;
+import java.util.Calendar;
+import java.util.Date;
+import java.util.TimeZone;
+import java.util.regex.Matcher;
+import java.util.regex.Pattern;
+
+public class BerGeneralizedTime extends BerVisibleString {
+
+    public final static BerTag tag = new BerTag(BerTag.UNIVERSAL_CLASS, BerTag.PRIMITIVE, BerTag.GENERALIZED_TIME_TAG);
+    private static final long serialVersionUID = 1L;
+    /*
+     * Generalized time is one of the following (ITU-T X.680 08/2015): YYYYMMDDHH[MM[SS]][.fff] LocalTime
+     * YYYYMMDDHH[MM[SS]][.fff]Z UTC YYYYMMDDHH[MM[SS]][.fff]+-HH[MM] local time with time zone
+     *
+     * Regexp: ^ (?<year>\\d{4}) YYYY (?<month>\\d{2}) MM (?<day>\\d{2}) DD (?<hour>\\d{2}) HH ( [MM[SS]]
+     * (?<minute>\\d{2}) MM (?<second>\\d{2})? [SS] )? ([.,](?<frac>\\d+))? [.fff] (or [,fff]) (?<timezone> "" or "Z" or
+     * "+-HH[MM]" Z | ( "+-HH[MM]" [+-] "+-" \\d{2}(?<tzmin>\\d{2})? HH[MM] ) )? $
+     */
+    private final static String GENERALIZED_TIME_PATTERN = "^(?<year>\\d{4})(?<month>\\d{2})(?<day>\\d{2})(?<hour>\\d{2})((?<minute>\\d{2})(?<second>\\d{2})?)?([.,](?<frac>\\d+))?(?<timezone>Z|([+-]\\d{2}(?<tzmin>\\d{2})?))?$";
+    private final static Pattern generalizedTimePattern = Pattern.compile(GENERALIZED_TIME_PATTERN);
+
+    public BerGeneralizedTime() {
+    }
+
+    public BerGeneralizedTime(byte[] value) {
+        super(value);
+    }
+
+    public BerGeneralizedTime(String valueAsString) {
+        super(valueAsString);
+    }
+
+    @Override
+    public int encode(BerByteArrayOutputStream os, boolean withTag) throws IOException {
+
+        int codeLength = super.encode(os, false);
+
+        if (withTag) {
+            codeLength += tag.encode(os);
+        }
+
+        return codeLength;
+    }
+
+    @Override
+    public int decode(InputStream is, boolean withTag) throws IOException {
+
+        int codeLength = 0;
+
+        if (withTag) {
+            codeLength += tag.decodeAndCheck(is);
+        }
+
+        codeLength += super.decode(is, false);
+
+        return codeLength;
+    }
+
+    Calendar asCalendar() throws ParseException {
+
+        Matcher matcher = generalizedTimePattern.matcher(toString());
+
+        if (!matcher.find()) {
+            throw new ParseException("", 0);
+        }
+
+        String mg, mgf;
+        int year = Integer.valueOf(matcher.group("year"));
+        int month = Integer.valueOf(matcher.group("month"));
+        month -= 1; // java.util.Calendar's month goes from 0 to 11
+        int day = Integer.valueOf(matcher.group("day"));
+        int hour = Integer.valueOf(matcher.group("hour"));
+
+        mg = matcher.group("minute");
+        mgf = matcher.group("frac");
+        int minute = 0, second = 0, millisec = 0;
+        double frac = mgf == null ? 0 : Double.valueOf("0." + mgf);
+        if (mg == null) {
+            // Missing minutes and seconds
+            if (mgf != null) {
+                // frac is a fraction of a hour
+                millisec = (int) Math.round(1000 * 60 * 60 * frac);
+            }
+        } else {
+            minute = Integer.valueOf(mg);
+            mg = matcher.group("second");
+            if (mg == null) {
+                // Missing seconds
+                if (mgf != null) {
+                    // frac is a fraction of a minute
+                    millisec = (int) Math.round(1000 * 60 * frac);
+                }
+            } else {
+                second = Integer.valueOf(mg);
+                if (mgf != null) {
+                    // frac is a fraction of a second
+                    millisec = (int) Math.round(1000 * frac);
+                }
+            }
+        }
+
+        mg = matcher.group("timezone");
+        String mgt = matcher.group("tzmin");
+        String timeZoneStr = mg == null ? TimeZone.getDefault().getID()
+                : (mg.equals("Z") ? "UTC" : (mgt == null ? "GMT" + mg + "00" : "GMT" + mg));
+        TimeZone timeZone = TimeZone.getTimeZone(timeZoneStr);
+
+        Calendar calendar = Calendar.getInstance();
+        calendar.setLenient(true); // accept millisec greater than 999
+        calendar.set(year, month, day, hour, minute, second);
+        calendar.set(Calendar.MILLISECOND, millisec);
+        calendar.setTimeZone(timeZone);
+
+        return calendar;
+    }
+
+    Date asDate() throws ParseException {
+        return asCalendar().getTime();
+    }
+
+}
diff --git a/src/main/java/org.onosproject.xran/codecs/ber/types/BerInteger.java b/src/main/java/org.onosproject.xran/codecs/ber/types/BerInteger.java
new file mode 100644
index 0000000..c22cd4d
--- /dev/null
+++ b/src/main/java/org.onosproject.xran/codecs/ber/types/BerInteger.java
@@ -0,0 +1,128 @@
+/* This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
+package org.onosproject.xran.codecs.ber.types;
+
+import com.fasterxml.jackson.annotation.JsonIgnore;
+import com.fasterxml.jackson.annotation.JsonValue;
+import org.onosproject.xran.codecs.ber.BerByteArrayOutputStream;
+import org.onosproject.xran.codecs.ber.BerLength;
+import org.onosproject.xran.codecs.ber.BerTag;
+import org.onosproject.xran.codecs.ber.internal.Util;
+
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.Serializable;
+import java.math.BigInteger;
+
+public class BerInteger implements Serializable {
+
+    public final static BerTag tag = new BerTag(BerTag.UNIVERSAL_CLASS, BerTag.PRIMITIVE, BerTag.INTEGER_TAG);
+    private static final long serialVersionUID = 1L;
+    @JsonIgnore
+    public byte[] code = null;
+
+    public BigInteger value;
+
+    public BerInteger() {
+    }
+
+    public BerInteger(byte[] code) {
+        this.code = code;
+    }
+
+    public BerInteger(BigInteger val) {
+        this.value = val;
+    }
+
+    public BerInteger(long val) {
+        this.value = BigInteger.valueOf(val);
+    }
+
+    public int encode(BerByteArrayOutputStream os) throws IOException {
+        return encode(os, true);
+    }
+
+    public int encode(BerByteArrayOutputStream os, boolean withTag) throws IOException {
+
+        if (code != null) {
+            for (int i = code.length - 1; i >= 0; i--) {
+                os.write(code[i]);
+            }
+            if (withTag) {
+                return tag.encode(os) + code.length;
+            }
+            return code.length;
+        }
+
+        byte[] encoded = value.toByteArray();
+        int codeLength = encoded.length;
+        os.write(encoded);
+
+        codeLength += BerLength.encodeLength(os, codeLength);
+
+        if (withTag) {
+            codeLength += tag.encode(os);
+        }
+
+        return codeLength;
+    }
+
+    public int decode(InputStream is) throws IOException {
+        return decode(is, true);
+    }
+
+    public int decode(InputStream is, boolean withTag) throws IOException {
+
+        int codeLength = 0;
+
+        if (withTag) {
+            codeLength += tag.decodeAndCheck(is);
+        }
+
+        BerLength length = new BerLength();
+        codeLength += length.decode(is);
+
+        if (length.val < 1) {
+            throw new IOException("Decoded length of BerInteger is not correct");
+        }
+
+        byte[] byteCode = new byte[length.val];
+        Util.readFully(is, byteCode);
+
+        codeLength += length.val;
+
+        value = new BigInteger(byteCode);
+
+        return codeLength;
+    }
+
+    public void encodeAndSave(int encodingSizeGuess) throws IOException {
+        BerByteArrayOutputStream os = new BerByteArrayOutputStream(encodingSizeGuess);
+        encode(os, false);
+        code = os.getArray();
+    }
+
+    @JsonValue
+    @Override
+    public String toString() {
+        return "" + value;
+    }
+
+    public byte byteValue() {
+        return value.byteValue();
+    }
+
+    public short shortValue() {
+        return value.shortValue();
+    }
+
+    public int intValue() {
+        return value.intValue();
+    }
+
+    public long longValue() {
+        return value.longValue();
+    }
+
+}
diff --git a/src/main/java/org.onosproject.xran/codecs/ber/types/BerNull.java b/src/main/java/org.onosproject.xran/codecs/ber/types/BerNull.java
new file mode 100644
index 0000000..6437d0b
--- /dev/null
+++ b/src/main/java/org.onosproject.xran/codecs/ber/types/BerNull.java
@@ -0,0 +1,72 @@
+/* This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
+package org.onosproject.xran.codecs.ber.types;
+
+import com.fasterxml.jackson.annotation.JsonIgnore;
+import com.fasterxml.jackson.annotation.JsonValue;
+import org.onosproject.xran.codecs.ber.BerByteArrayOutputStream;
+import org.onosproject.xran.codecs.ber.BerLength;
+import org.onosproject.xran.codecs.ber.BerTag;
+
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.Serializable;
+
+public class BerNull implements Serializable {
+
+    public final static BerTag tag = new BerTag(BerTag.UNIVERSAL_CLASS, BerTag.PRIMITIVE, BerTag.NULL_TAG);
+    private static final long serialVersionUID = 1L;
+    @JsonIgnore
+    public byte[] code = null;
+
+    public BerNull() {
+    }
+
+    public BerNull(byte[] code) {
+    }
+
+    public int encode(BerByteArrayOutputStream os) throws IOException {
+        return encode(os, true);
+    }
+
+    public int encode(BerByteArrayOutputStream os, boolean withTag) throws IOException {
+
+        int codeLength = BerLength.encodeLength(os, 0);
+
+        if (withTag) {
+            codeLength += tag.encode(os);
+        }
+
+        return codeLength;
+    }
+
+    public int decode(InputStream is) throws IOException {
+        return decode(is, true);
+    }
+
+    public int decode(InputStream is, boolean withTag) throws IOException {
+
+        int codeLength = 0;
+
+        if (withTag) {
+            codeLength += tag.decodeAndCheck(is);
+        }
+
+        BerLength length = new BerLength();
+        codeLength += length.decode(is);
+
+        if (length.val != 0) {
+            throw new IOException("Decoded length of BerNull is not correct");
+        }
+
+        return codeLength;
+    }
+
+    @JsonValue
+    @Override
+    public String toString() {
+        return "ASN1_NULL";
+    }
+
+}
diff --git a/src/main/java/org.onosproject.xran/codecs/ber/types/BerObjectIdentifier.java b/src/main/java/org.onosproject.xran/codecs/ber/types/BerObjectIdentifier.java
new file mode 100644
index 0000000..d1cf4ba
--- /dev/null
+++ b/src/main/java/org.onosproject.xran/codecs/ber/types/BerObjectIdentifier.java
@@ -0,0 +1,209 @@
+/* This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
+package org.onosproject.xran.codecs.ber.types;
+
+import com.fasterxml.jackson.annotation.JsonIgnore;
+import com.fasterxml.jackson.annotation.JsonValue;
+import org.onosproject.xran.codecs.ber.BerByteArrayOutputStream;
+import org.onosproject.xran.codecs.ber.BerLength;
+import org.onosproject.xran.codecs.ber.BerTag;
+import org.onosproject.xran.codecs.ber.internal.Util;
+
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.Serializable;
+import java.util.ArrayList;
+import java.util.List;
+
+public class BerObjectIdentifier implements Serializable {
+
+    public final static BerTag tag = new BerTag(BerTag.UNIVERSAL_CLASS, BerTag.PRIMITIVE, BerTag.OBJECT_IDENTIFIER_TAG);
+    private static final long serialVersionUID = 1L;
+    @JsonIgnore
+    public byte[] code = null;
+
+    public int[] value;
+
+    public BerObjectIdentifier() {
+    }
+
+    public BerObjectIdentifier(byte[] code) {
+        this.code = code;
+    }
+
+    public BerObjectIdentifier(int[] value) {
+        if ((value.length < 2) || ((value[0] == 0 || value[0] == 1) && (value[1] > 39)) || value[0] > 2) {
+            throw new IllegalArgumentException("invalid object identifier components");
+        }
+        for (int objectIdentifierComponent : value) {
+            if (objectIdentifierComponent < 0) {
+                throw new IllegalArgumentException("invalid object identifier components");
+            }
+        }
+
+        this.value = value;
+
+    }
+
+    public int encode(BerByteArrayOutputStream os) throws IOException {
+        return encode(os, true);
+    }
+
+    public int encode(BerByteArrayOutputStream os, boolean withTag) throws IOException {
+
+        if (code != null) {
+            for (int i = code.length - 1; i >= 0; i--) {
+                os.write(code[i]);
+            }
+            if (withTag) {
+                return tag.encode(os) + code.length;
+            }
+            return code.length;
+        }
+
+        int firstSubidentifier = 40 * value[0] + value[1];
+
+        int subidentifier;
+
+        int codeLength = 0;
+
+        for (int i = (value.length - 1); i > 0; i--) {
+
+            if (i == 1) {
+                subidentifier = firstSubidentifier;
+            } else {
+                subidentifier = value[i];
+            }
+
+            // get length of subidentifier
+            int subIDLength = 1;
+            while (subidentifier > (Math.pow(2, (7 * subIDLength)) - 1)) {
+                subIDLength++;
+            }
+
+            os.write(subidentifier & 0x7f);
+
+            for (int j = 1; j <= (subIDLength - 1); j++) {
+                os.write(((subidentifier >> (7 * j)) & 0xff) | 0x80);
+            }
+
+            codeLength += subIDLength;
+        }
+
+        codeLength += BerLength.encodeLength(os, codeLength);
+
+        if (withTag) {
+            codeLength += tag.encode(os);
+        }
+
+        return codeLength;
+    }
+
+    public int decode(InputStream is) throws IOException {
+        return decode(is, true);
+    }
+
+    public int decode(InputStream is, boolean withTag) throws IOException {
+
+        int codeLength = 0;
+
+        if (withTag) {
+            codeLength += tag.decodeAndCheck(is);
+        }
+
+        BerLength length = new BerLength();
+        codeLength += length.decode(is);
+
+        if (length.val == 0) {
+            value = new int[0];
+            return codeLength;
+        }
+
+        byte[] byteCode = new byte[length.val];
+        Util.readFully(is, byteCode);
+
+        codeLength += length.val;
+
+        List<Integer> objectIdentifierComponentsList = new ArrayList<>();
+
+        int subIDEndIndex = 0;
+        while ((byteCode[subIDEndIndex] & 0x80) == 0x80) {
+            if (subIDEndIndex >= (length.val - 1)) {
+                throw new IOException("Invalid Object Identifier");
+            }
+            subIDEndIndex++;
+        }
+
+        int subidentifier = 0;
+        for (int i = 0; i <= subIDEndIndex; i++) {
+            subidentifier |= (byteCode[i] << ((subIDEndIndex - i) * 7));
+        }
+
+        if (subidentifier < 40) {
+            objectIdentifierComponentsList.add(0);
+            objectIdentifierComponentsList.add(subidentifier);
+        } else if (subidentifier < 80) {
+            objectIdentifierComponentsList.add(1);
+            objectIdentifierComponentsList.add(subidentifier - 40);
+        } else {
+            objectIdentifierComponentsList.add(2);
+            objectIdentifierComponentsList.add(subidentifier - 80);
+        }
+
+        subIDEndIndex++;
+
+        while (subIDEndIndex < length.val) {
+            int subIDStartIndex = subIDEndIndex;
+
+            while ((byteCode[subIDEndIndex] & 0x80) == 0x80) {
+                if (subIDEndIndex == (length.val - 1)) {
+                    throw new IOException("Invalid Object Identifier");
+                }
+                subIDEndIndex++;
+            }
+            subidentifier = 0;
+            for (int j = subIDStartIndex; j <= subIDEndIndex; j++) {
+                subidentifier |= ((byteCode[j] & 0x7f) << ((subIDEndIndex - j) * 7));
+            }
+            objectIdentifierComponentsList.add(subidentifier);
+            subIDEndIndex++;
+        }
+
+        value = new int[objectIdentifierComponentsList.size()];
+        for (int i = 0; i < objectIdentifierComponentsList.size(); i++) {
+            value[i] = objectIdentifierComponentsList.get(i);
+        }
+
+        return codeLength;
+
+    }
+
+    @JsonValue
+    @Override
+    public String toString() {
+        if (value == null || value.length == 0) {
+            return "";
+        }
+
+        String objIDString = "";
+        objIDString += value[0];
+        for (int i = 1; i < value.length; i++) {
+            objIDString += "." + value[i];
+        }
+        return objIDString;
+    }
+
+    public BerObjectIdentifier append(int value) {
+        if (this.value == null) {
+            return new BerObjectIdentifier(new int[]{value});
+        }
+        int[] values = new int[this.value.length + 1];
+        for (int i = 0; i < this.value.length; ++i) {
+            values[i] = this.value[i];
+        }
+        values[values.length - 1] = value;
+        return new BerObjectIdentifier(values);
+    }
+
+}
diff --git a/src/main/java/org.onosproject.xran/codecs/ber/types/BerOctetString.java b/src/main/java/org.onosproject.xran/codecs/ber/types/BerOctetString.java
new file mode 100644
index 0000000..906e060
--- /dev/null
+++ b/src/main/java/org.onosproject.xran/codecs/ber/types/BerOctetString.java
@@ -0,0 +1,81 @@
+/* This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
+package org.onosproject.xran.codecs.ber.types;
+
+import com.fasterxml.jackson.annotation.JsonValue;
+import org.onosproject.xran.codecs.ber.BerByteArrayOutputStream;
+import org.onosproject.xran.codecs.ber.BerLength;
+import org.onosproject.xran.codecs.ber.BerTag;
+import org.onosproject.xran.codecs.ber.internal.Util;
+import org.onosproject.xran.codecs.util.HexConverter;
+
+import javax.xml.bind.DatatypeConverter;
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.Serializable;
+
+public class BerOctetString implements Serializable {
+
+    public final static BerTag tag = new BerTag(BerTag.UNIVERSAL_CLASS, BerTag.PRIMITIVE, BerTag.OCTET_STRING_TAG);
+    private static final long serialVersionUID = 1L;
+    public byte[] value;
+
+    public BerOctetString() {
+    }
+
+    public BerOctetString(byte[] value) {
+        this.value = value;
+    }
+
+    public int encode(BerByteArrayOutputStream os) throws IOException {
+        return encode(os, true);
+    }
+
+    public int encode(BerByteArrayOutputStream os, boolean withTag) throws IOException {
+
+        os.write(value);
+        int codeLength = value.length;
+
+        codeLength += BerLength.encodeLength(os, codeLength);
+
+        if (withTag) {
+            codeLength += tag.encode(os);
+        }
+
+        return codeLength;
+    }
+
+    public int decode(InputStream is) throws IOException {
+        return decode(is, true);
+    }
+
+    public int decode(InputStream is, boolean withTag) throws IOException {
+
+        int codeLength = 0;
+
+        if (withTag) {
+            codeLength += tag.decodeAndCheck(is);
+        }
+
+        BerLength length = new BerLength();
+        codeLength += length.decode(is);
+
+        value = new byte[length.val];
+
+        if (length.val != 0) {
+            Util.readFully(is, value);
+            codeLength += length.val;
+        }
+
+        return codeLength;
+
+    }
+
+    @JsonValue
+    @Override
+    public String toString() {
+        return DatatypeConverter.printHexBinary(value);
+    }
+
+}
diff --git a/src/main/java/org.onosproject.xran/codecs/ber/types/BerReal.java b/src/main/java/org.onosproject.xran/codecs/ber/types/BerReal.java
new file mode 100644
index 0000000..08f8d06
--- /dev/null
+++ b/src/main/java/org.onosproject.xran/codecs/ber/types/BerReal.java
@@ -0,0 +1,233 @@
+/* This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
+package org.onosproject.xran.codecs.ber.types;
+
+import com.fasterxml.jackson.annotation.JsonIgnore;
+import com.fasterxml.jackson.annotation.JsonValue;
+import org.onosproject.xran.codecs.ber.BerByteArrayOutputStream;
+import org.onosproject.xran.codecs.ber.BerLength;
+import org.onosproject.xran.codecs.ber.BerTag;
+import org.onosproject.xran.codecs.ber.internal.Util;
+
+import java.io.EOFException;
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.Serializable;
+import java.math.BigInteger;
+
+public class BerReal implements Serializable {
+
+    public final static BerTag tag = new BerTag(BerTag.UNIVERSAL_CLASS, BerTag.PRIMITIVE, BerTag.REAL_TAG);
+    private static final long serialVersionUID = 1L;
+    @JsonIgnore
+    public byte[] code = null;
+
+    public double value;
+
+    public BerReal() {
+    }
+
+    public BerReal(byte[] code) {
+        this.code = code;
+    }
+
+    public BerReal(double value) {
+        this.value = value;
+    }
+
+    public int encode(BerByteArrayOutputStream os) throws IOException {
+        return encode(os, true);
+    }
+
+    public int encode(BerByteArrayOutputStream os, boolean withTag) throws IOException {
+
+        if (code != null) {
+            for (int i = code.length - 1; i >= 0; i--) {
+                os.write(code[i]);
+            }
+            if (withTag) {
+                return tag.encode(os) + code.length;
+            }
+            return code.length;
+        }
+
+        int codeLength = encodeValue(os);
+
+        codeLength += BerLength.encodeLength(os, codeLength);
+
+        if (withTag) {
+            codeLength += tag.encode(os);
+        }
+
+        return codeLength;
+    }
+
+    private int encodeValue(BerByteArrayOutputStream os) throws IOException {
+
+        // explained in Annex C and Ch. 8.5 of X.690
+
+        // we use binary encoding, with base 2 and F==0
+        // F is only needed when encoding with base 8 or 16
+
+        long longBits = Double.doubleToLongBits(value);
+
+        boolean isNegative = (longBits & 0x8000000000000000L) == 0x8000000000000000L;
+
+        int exponent = ((int) (longBits >> 52)) & 0x7ff;
+
+        long mantissa = (longBits & 0x000fffffffffffffL) | 0x0010000000000000L;
+
+        if (exponent == 0x7ff) {
+            if (mantissa == 0x0010000000000000L) {
+                if (isNegative) {
+                    // - infinity
+                    os.write(0x41);
+                } else {
+                    // + infinity
+                    os.write(0x40);
+                }
+                return 1;
+            } else {
+                throw new IOException("NAN not supported");
+            }
+        }
+
+        if ((exponent == 0 && mantissa == 0x0010000000000000L)) {
+            // zero
+            return 0;
+        }
+
+        // because IEEE double-precision format is (-1)^sign * 1.b51b50..b0 * 2^(e-1023) we need to subtract 1023 and 52
+        // from the exponent to get an exponent corresponding to an integer matissa as need here.
+        exponent -= 1075; // 1023 + 52 = 1075
+
+        // trailing zeros of the mantissa should be removed. Therefor find out how much the mantissa can be shifted and
+        // the exponent can be increased
+        int exponentIncr = 0;
+        while (((mantissa >> exponentIncr) & 0xff) == 0x00) {
+            exponentIncr += 8;
+        }
+        while (((mantissa >> exponentIncr) & 0x01) == 0x00) {
+            exponentIncr++;
+        }
+
+        exponent += exponentIncr;
+        mantissa >>= exponentIncr;
+
+        int mantissaLength = (Long.SIZE - Long.numberOfLeadingZeros(mantissa) + 7) / 8;
+
+        for (int i = 0; i < mantissaLength; i++) {
+            os.write((int) (mantissa >> (8 * i)));
+        }
+        int codeLength = mantissaLength;
+
+        byte[] exponentBytes = BigInteger.valueOf(exponent).toByteArray();
+        os.write(exponentBytes);
+        codeLength += exponentBytes.length;
+
+        byte exponentFormat = 0;
+        if (exponentBytes.length < 4) {
+            exponentFormat = (byte) (exponentBytes.length - 1);
+        } else {
+            os.write(exponentBytes.length);
+            codeLength++;
+            exponentFormat = 0x03;
+        }
+
+        if (isNegative) {
+            os.write(0x80 | 0x40 | exponentFormat);
+        } else {
+            os.write(0x80 | exponentFormat);
+        }
+
+        codeLength++;
+
+        return codeLength;
+    }
+
+    public int decode(InputStream is) throws IOException {
+        return decode(is, true);
+    }
+
+    public int decode(InputStream is, boolean withTag) throws IOException {
+
+        int codeLength = 0;
+
+        if (withTag) {
+            codeLength += tag.decodeAndCheck(is);
+        }
+
+        BerLength length = new BerLength();
+        codeLength += length.decode(is);
+
+        if (length.val == 0) {
+            value = 0;
+            return codeLength;
+        }
+
+        if (length.val == 1) {
+            int nextByte = is.read();
+            if (nextByte == -1) {
+                throw new EOFException("Unexpected end of input stream.");
+            }
+            if (nextByte == 0x40) {
+                value = Double.POSITIVE_INFINITY;
+            } else if (nextByte == 0x41) {
+                value = Double.NEGATIVE_INFINITY;
+            } else {
+                throw new IOException("invalid real encoding");
+            }
+            return codeLength + 1;
+        }
+
+        byte[] byteCode = new byte[length.val];
+        Util.readFully(is, byteCode);
+
+        if ((byteCode[0] & 0x80) != 0x80) {
+            throw new IOException("Only binary REAL encoding is supported");
+        }
+
+        codeLength += length.val;
+        int tempLength = 1;
+
+        int sign = 1;
+        if ((byteCode[0] & 0x40) == 0x40) {
+            sign = -1;
+        }
+
+        int exponentLength = (byteCode[0] & 0x03) + 1;
+        if (exponentLength == 4) {
+            exponentLength = byteCode[1];
+            tempLength++;
+        }
+
+        tempLength += exponentLength;
+
+        int exponent = 0;
+        for (int i = 0; i < exponentLength; i++) {
+            exponent |= byteCode[1 + i] << (8 * (exponentLength - i - 1));
+        }
+
+        long mantissa = 0;
+        for (int i = 0; i < length.val - tempLength; i++) {
+            mantissa |= (byteCode[i + tempLength] & 0xffL) << (8 * (length.val - tempLength - i - 1));
+        }
+
+        value = sign * mantissa * Math.pow(2, exponent);
+
+        return codeLength;
+    }
+
+    public void encodeAndSave(int encodingSizeGuess) throws IOException {
+        BerByteArrayOutputStream os = new BerByteArrayOutputStream(encodingSizeGuess);
+        encode(os, false);
+        code = os.getArray();
+    }
+
+    @JsonValue
+    @Override
+    public String toString() {
+        return "" + value;
+    }
+}
diff --git a/src/main/java/org.onosproject.xran/codecs/ber/types/BerTime.java b/src/main/java/org.onosproject.xran/codecs/ber/types/BerTime.java
new file mode 100644
index 0000000..cfd8d65
--- /dev/null
+++ b/src/main/java/org.onosproject.xran/codecs/ber/types/BerTime.java
@@ -0,0 +1,56 @@
+/* This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
+package org.onosproject.xran.codecs.ber.types;
+
+import org.onosproject.xran.codecs.ber.BerByteArrayOutputStream;
+import org.onosproject.xran.codecs.ber.BerTag;
+import org.onosproject.xran.codecs.ber.types.string.BerVisibleString;
+
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.UnsupportedEncodingException;
+
+public class BerTime extends BerVisibleString {
+
+    public final static BerTag tag = new BerTag(BerTag.UNIVERSAL_CLASS, BerTag.PRIMITIVE, BerTag.TIME_TAG);
+    private static final long serialVersionUID = 1L;
+
+    public BerTime() {
+    }
+
+    public BerTime(byte[] value) {
+        super(value);
+    }
+
+    public BerTime(String valueAsString) throws UnsupportedEncodingException {
+        super(valueAsString);
+    }
+
+    @Override
+    public int encode(BerByteArrayOutputStream os, boolean withTag) throws IOException {
+
+        int codeLength = super.encode(os, false);
+
+        if (withTag) {
+            codeLength += tag.encode(os);
+        }
+
+        return codeLength;
+    }
+
+    @Override
+    public int decode(InputStream is, boolean withTag) throws IOException {
+
+        int codeLength = 0;
+
+        if (withTag) {
+            codeLength += tag.decodeAndCheck(is);
+        }
+
+        codeLength += super.decode(is, false);
+
+        return codeLength;
+    }
+
+}
diff --git a/src/main/java/org.onosproject.xran/codecs/ber/types/BerTimeOfDay.java b/src/main/java/org.onosproject.xran/codecs/ber/types/BerTimeOfDay.java
new file mode 100644
index 0000000..d592a72
--- /dev/null
+++ b/src/main/java/org.onosproject.xran/codecs/ber/types/BerTimeOfDay.java
@@ -0,0 +1,55 @@
+/* This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
+package org.onosproject.xran.codecs.ber.types;
+
+import org.onosproject.xran.codecs.ber.BerByteArrayOutputStream;
+import org.onosproject.xran.codecs.ber.BerTag;
+
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.UnsupportedEncodingException;
+
+public class BerTimeOfDay extends BerTime {
+
+    public final static BerTag tag = new BerTag(BerTag.UNIVERSAL_CLASS, BerTag.PRIMITIVE, BerTag.TIME_OF_DAY_TAG);
+    private static final long serialVersionUID = 1L;
+
+    public BerTimeOfDay() {
+    }
+
+    public BerTimeOfDay(byte[] value) {
+        super(value);
+    }
+
+    public BerTimeOfDay(String valueAsString) throws UnsupportedEncodingException {
+        super(valueAsString);
+    }
+
+    @Override
+    public int encode(BerByteArrayOutputStream os, boolean withTag) throws IOException {
+
+        int codeLength = super.encode(os, false);
+
+        if (withTag) {
+            codeLength += tag.encode(os);
+        }
+
+        return codeLength;
+    }
+
+    @Override
+    public int decode(InputStream is, boolean withTag) throws IOException {
+
+        int codeLength = 0;
+
+        if (withTag) {
+            codeLength += tag.decodeAndCheck(is);
+        }
+
+        codeLength += super.decode(is, false);
+
+        return codeLength;
+    }
+
+}
diff --git a/src/main/java/org.onosproject.xran/codecs/ber/types/BerUtcTime.java b/src/main/java/org.onosproject.xran/codecs/ber/types/BerUtcTime.java
new file mode 100644
index 0000000..2cfc6b5
--- /dev/null
+++ b/src/main/java/org.onosproject.xran/codecs/ber/types/BerUtcTime.java
@@ -0,0 +1,107 @@
+/* This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
+package org.onosproject.xran.codecs.ber.types;
+
+import org.onosproject.xran.codecs.ber.BerByteArrayOutputStream;
+import org.onosproject.xran.codecs.ber.BerTag;
+import org.onosproject.xran.codecs.ber.types.string.BerVisibleString;
+
+import java.io.IOException;
+import java.io.InputStream;
+import java.text.ParseException;
+import java.util.Calendar;
+import java.util.Date;
+import java.util.TimeZone;
+import java.util.regex.Matcher;
+import java.util.regex.Pattern;
+
+public class BerUtcTime extends BerVisibleString {
+
+    public final static BerTag tag = new BerTag(BerTag.UNIVERSAL_CLASS, BerTag.PRIMITIVE, BerTag.UTC_TIME_TAG);
+    private static final long serialVersionUID = 1L;
+    /*
+     * UTC time is one of the following (ITU-T X.680 08/2015): YYMMDDhhmm[ss]Z YYMMDDhhmm[ss](+|-)hhmm Regexp: ^
+     * (?<year>\\d{2}) YY (?<month>\\d{2}) MM (?<day>\\d{2}) DD (?<hour>\\d{2}) hh (?<minute>\\d{2}) mm
+     * (?<second>\\d{2})? ss (?<timezone> Z | Z or (+|-)hhmm ( [+-]\\d{4} (+|-)hhmm ) ) $
+     */
+    private final static String UTC_TIME_PATTERN = "^(?<year>\\d{2})(?<month>\\d{2})(?<day>\\d{2})(?<hour>\\d{2})(?<minute>\\d{2})(?<second>\\d{2})?(?<timezone>Z|([+-]\\d{4}))$";
+    private final static Pattern utcTimePattern = Pattern.compile(UTC_TIME_PATTERN);
+
+    public BerUtcTime() {
+    }
+
+    public BerUtcTime(byte[] value) {
+        this.value = value;
+    }
+
+    public BerUtcTime(String valueAsString) {
+        super(valueAsString);
+    }
+
+    @Override
+    public int encode(BerByteArrayOutputStream os, boolean withTag) throws IOException {
+
+        int codeLength = super.encode(os, false);
+
+        if (withTag) {
+            codeLength += tag.encode(os);
+        }
+
+        return codeLength;
+    }
+
+    @Override
+    public int decode(InputStream is, boolean withTag) throws IOException {
+
+        int codeLength = 0;
+
+        if (withTag) {
+            codeLength += tag.decodeAndCheck(is);
+        }
+
+        codeLength += super.decode(is, false);
+
+        return codeLength;
+    }
+
+    @SuppressWarnings("WeakerAccess")
+    Calendar asCalendar() throws ParseException {
+
+        Matcher matcher = utcTimePattern.matcher(toString());
+
+        if (!matcher.find())
+            throw new ParseException("", 0);
+
+        String mg;
+        int year = Integer.valueOf(matcher.group("year"));
+        int month = Integer.valueOf(matcher.group("month"));
+        month -= 1; // java.util.Calendar's month goes from 0 to 11
+        int day = Integer.valueOf(matcher.group("day"));
+        int hour = Integer.valueOf(matcher.group("hour"));
+        int minute = Integer.valueOf(matcher.group("minute"));
+        mg = matcher.group("second");
+        int second = mg == null ? 0 : Integer.valueOf(mg);
+
+        mg = matcher.group("timezone");
+        String timeZoneStr = mg.equals("Z") ? "UTC" : "GMT" + mg;
+        TimeZone timeZone = TimeZone.getTimeZone(timeZoneStr);
+
+        Calendar calendar = Calendar.getInstance(timeZone);
+
+        // Add 2000 to the year
+        int century = (calendar.get(Calendar.YEAR) / 100) * 100;
+        year += century;
+
+        // noinspection MagicConstant
+        calendar.set(year, month, day, hour, minute, second);
+        calendar.set(Calendar.MILLISECOND, 0);
+
+        return calendar;
+    }
+
+    Date asDate() throws ParseException {
+        return asCalendar().getTime();
+    }
+
+}
diff --git a/src/main/java/org.onosproject.xran/codecs/ber/types/string/BerBMPString.java b/src/main/java/org.onosproject.xran/codecs/ber/types/string/BerBMPString.java
new file mode 100644
index 0000000..5f36c5a
--- /dev/null
+++ b/src/main/java/org.onosproject.xran/codecs/ber/types/string/BerBMPString.java
@@ -0,0 +1,58 @@
+/* This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
+package org.onosproject.xran.codecs.ber.types.string;
+
+import com.fasterxml.jackson.annotation.JsonValue;
+import org.onosproject.xran.codecs.ber.BerByteArrayOutputStream;
+import org.onosproject.xran.codecs.ber.BerTag;
+import org.onosproject.xran.codecs.ber.types.BerOctetString;
+
+import java.io.IOException;
+import java.io.InputStream;
+
+public class BerBMPString extends BerOctetString {
+
+    public final static BerTag tag = new BerTag(BerTag.UNIVERSAL_CLASS, BerTag.PRIMITIVE, BerTag.BMP_STRING_TAG);
+    private static final long serialVersionUID = 1L;
+
+    public BerBMPString() {
+    }
+
+    public BerBMPString(byte[] value) {
+        this.value = value;
+    }
+
+    @JsonValue
+    @Override
+    public String toString() {
+        return new String(value);
+    }
+
+    @Override
+    public int encode(BerByteArrayOutputStream os, boolean withTag) throws IOException {
+
+        int codeLength = super.encode(os, false);
+
+        if (withTag) {
+            codeLength += tag.encode(os);
+        }
+
+        return codeLength;
+    }
+
+    @Override
+    public int decode(InputStream is, boolean withTag) throws IOException {
+
+        int codeLength = 0;
+
+        if (withTag) {
+            codeLength += tag.decodeAndCheck(is);
+        }
+
+        codeLength += super.decode(is, false);
+
+        return codeLength;
+    }
+
+}
diff --git a/src/main/java/org.onosproject.xran/codecs/ber/types/string/BerGeneralString.java b/src/main/java/org.onosproject.xran/codecs/ber/types/string/BerGeneralString.java
new file mode 100644
index 0000000..1c89db5
--- /dev/null
+++ b/src/main/java/org.onosproject.xran/codecs/ber/types/string/BerGeneralString.java
@@ -0,0 +1,58 @@
+/* This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
+package org.onosproject.xran.codecs.ber.types.string;
+
+import com.fasterxml.jackson.annotation.JsonValue;
+import org.onosproject.xran.codecs.ber.BerByteArrayOutputStream;
+import org.onosproject.xran.codecs.ber.BerTag;
+import org.onosproject.xran.codecs.ber.types.BerOctetString;
+
+import java.io.IOException;
+import java.io.InputStream;
+
+public class BerGeneralString extends BerOctetString {
+
+    public final static BerTag tag = new BerTag(BerTag.UNIVERSAL_CLASS, BerTag.PRIMITIVE, BerTag.GENERAL_STRING_TAG);
+    private static final long serialVersionUID = 1L;
+
+    public BerGeneralString() {
+    }
+
+    public BerGeneralString(byte[] value) {
+        this.value = value;
+    }
+
+    @JsonValue
+    @Override
+    public String toString() {
+        return new String(value);
+    }
+
+    @Override
+    public int encode(BerByteArrayOutputStream os, boolean withTag) throws IOException {
+
+        int codeLength = super.encode(os, false);
+
+        if (withTag) {
+            codeLength += tag.encode(os);
+        }
+
+        return codeLength;
+    }
+
+    @Override
+    public int decode(InputStream is, boolean withTag) throws IOException {
+
+        int codeLength = 0;
+
+        if (withTag) {
+            codeLength += tag.decodeAndCheck(is);
+        }
+
+        codeLength += super.decode(is, false);
+
+        return codeLength;
+    }
+
+}
diff --git a/src/main/java/org.onosproject.xran/codecs/ber/types/string/BerGraphicString.java b/src/main/java/org.onosproject.xran/codecs/ber/types/string/BerGraphicString.java
new file mode 100644
index 0000000..ef70e72
--- /dev/null
+++ b/src/main/java/org.onosproject.xran/codecs/ber/types/string/BerGraphicString.java
@@ -0,0 +1,58 @@
+/* This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
+package org.onosproject.xran.codecs.ber.types.string;
+
+import com.fasterxml.jackson.annotation.JsonValue;
+import org.onosproject.xran.codecs.ber.BerByteArrayOutputStream;
+import org.onosproject.xran.codecs.ber.BerTag;
+import org.onosproject.xran.codecs.ber.types.BerOctetString;
+
+import java.io.IOException;
+import java.io.InputStream;
+
+public class BerGraphicString extends BerOctetString {
+
+    public final static BerTag tag = new BerTag(BerTag.UNIVERSAL_CLASS, BerTag.PRIMITIVE, BerTag.GRAPHIC_STRING_TAG);
+    private static final long serialVersionUID = 1L;
+
+    public BerGraphicString() {
+    }
+
+    public BerGraphicString(byte[] value) {
+        this.value = value;
+    }
+
+    @JsonValue
+    @Override
+    public String toString() {
+        return new String(value);
+    }
+
+    @Override
+    public int encode(BerByteArrayOutputStream os, boolean withTag) throws IOException {
+
+        int codeLength = super.encode(os, false);
+
+        if (withTag) {
+            codeLength += tag.encode(os);
+        }
+
+        return codeLength;
+    }
+
+    @Override
+    public int decode(InputStream is, boolean withTag) throws IOException {
+
+        int codeLength = 0;
+
+        if (withTag) {
+            codeLength += tag.decodeAndCheck(is);
+        }
+
+        codeLength += super.decode(is, false);
+
+        return codeLength;
+    }
+
+}
diff --git a/src/main/java/org.onosproject.xran/codecs/ber/types/string/BerIA5String.java b/src/main/java/org.onosproject.xran/codecs/ber/types/string/BerIA5String.java
new file mode 100644
index 0000000..a56240e
--- /dev/null
+++ b/src/main/java/org.onosproject.xran/codecs/ber/types/string/BerIA5String.java
@@ -0,0 +1,58 @@
+/* This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
+package org.onosproject.xran.codecs.ber.types.string;
+
+import com.fasterxml.jackson.annotation.JsonValue;
+import org.onosproject.xran.codecs.ber.BerByteArrayOutputStream;
+import org.onosproject.xran.codecs.ber.BerTag;
+import org.onosproject.xran.codecs.ber.types.BerOctetString;
+
+import java.io.IOException;
+import java.io.InputStream;
+
+public class BerIA5String extends BerOctetString {
+
+    public final static BerTag tag = new BerTag(BerTag.UNIVERSAL_CLASS, BerTag.PRIMITIVE, BerTag.IA5_STRING_TAG);
+    private static final long serialVersionUID = 1L;
+
+    public BerIA5String() {
+    }
+
+    public BerIA5String(byte[] value) {
+        this.value = value;
+    }
+
+    @JsonValue
+    @Override
+    public String toString() {
+        return new String(value);
+    }
+
+    @Override
+    public int encode(BerByteArrayOutputStream os, boolean withTag) throws IOException {
+
+        int codeLength = super.encode(os, false);
+
+        if (withTag) {
+            codeLength += tag.encode(os);
+        }
+
+        return codeLength;
+    }
+
+    @Override
+    public int decode(InputStream is, boolean withTag) throws IOException {
+
+        int codeLength = 0;
+
+        if (withTag) {
+            codeLength += tag.decodeAndCheck(is);
+        }
+
+        codeLength += super.decode(is, false);
+
+        return codeLength;
+    }
+
+}
diff --git a/src/main/java/org.onosproject.xran/codecs/ber/types/string/BerNumericString.java b/src/main/java/org.onosproject.xran/codecs/ber/types/string/BerNumericString.java
new file mode 100644
index 0000000..944b66d
--- /dev/null
+++ b/src/main/java/org.onosproject.xran/codecs/ber/types/string/BerNumericString.java
@@ -0,0 +1,58 @@
+/* This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
+package org.onosproject.xran.codecs.ber.types.string;
+
+import com.fasterxml.jackson.annotation.JsonValue;
+import org.onosproject.xran.codecs.ber.BerByteArrayOutputStream;
+import org.onosproject.xran.codecs.ber.BerTag;
+import org.onosproject.xran.codecs.ber.types.BerOctetString;
+
+import java.io.IOException;
+import java.io.InputStream;
+
+public class BerNumericString extends BerOctetString {
+
+    public final static BerTag tag = new BerTag(BerTag.UNIVERSAL_CLASS, BerTag.PRIMITIVE, BerTag.NUMERIC_STRING_TAG);
+    private static final long serialVersionUID = 1L;
+
+    public BerNumericString() {
+    }
+
+    public BerNumericString(byte[] value) {
+        this.value = value;
+    }
+
+    @JsonValue
+    @Override
+    public String toString() {
+        return new String(value);
+    }
+
+    @Override
+    public int encode(BerByteArrayOutputStream os, boolean withTag) throws IOException {
+
+        int codeLength = super.encode(os, false);
+
+        if (withTag) {
+            codeLength += tag.encode(os);
+        }
+
+        return codeLength;
+    }
+
+    @Override
+    public int decode(InputStream is, boolean withTag) throws IOException {
+
+        int codeLength = 0;
+
+        if (withTag) {
+            codeLength += tag.decodeAndCheck(is);
+        }
+
+        codeLength += super.decode(is, false);
+
+        return codeLength;
+    }
+
+}
diff --git a/src/main/java/org.onosproject.xran/codecs/ber/types/string/BerObjectDescriptor.java b/src/main/java/org.onosproject.xran/codecs/ber/types/string/BerObjectDescriptor.java
new file mode 100644
index 0000000..2b80cb0
--- /dev/null
+++ b/src/main/java/org.onosproject.xran/codecs/ber/types/string/BerObjectDescriptor.java
@@ -0,0 +1,51 @@
+/* This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
+package org.onosproject.xran.codecs.ber.types.string;
+
+import org.onosproject.xran.codecs.ber.BerByteArrayOutputStream;
+import org.onosproject.xran.codecs.ber.BerTag;
+
+import java.io.IOException;
+import java.io.InputStream;
+
+public class BerObjectDescriptor extends BerGraphicString {
+
+    public static final BerTag tag = new BerTag(BerTag.UNIVERSAL_CLASS, BerTag.PRIMITIVE, BerTag.OBJECT_DESCRIPTOR_TAG);
+    private static final long serialVersionUID = 1L;
+
+    public BerObjectDescriptor() {
+    }
+
+    public BerObjectDescriptor(byte[] value) {
+        super(value);
+    }
+
+    @Override
+    public int encode(BerByteArrayOutputStream os, boolean withTag) throws IOException {
+
+        int codeLength;
+
+        codeLength = super.encode(os, false);
+        if (withTag) {
+            codeLength += tag.encode(os);
+        }
+
+        return codeLength;
+    }
+
+    @Override
+    public int decode(InputStream is, boolean withTag) throws IOException {
+
+        int codeLength = 0;
+
+        if (withTag) {
+            codeLength += tag.decodeAndCheck(is);
+        }
+
+        codeLength += super.decode(is, false);
+
+        return codeLength;
+    }
+
+}
diff --git a/src/main/java/org.onosproject.xran/codecs/ber/types/string/BerPrintableString.java b/src/main/java/org.onosproject.xran/codecs/ber/types/string/BerPrintableString.java
new file mode 100644
index 0000000..d865dcb
--- /dev/null
+++ b/src/main/java/org.onosproject.xran/codecs/ber/types/string/BerPrintableString.java
@@ -0,0 +1,58 @@
+/* This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
+package org.onosproject.xran.codecs.ber.types.string;
+
+import com.fasterxml.jackson.annotation.JsonValue;
+import org.onosproject.xran.codecs.ber.BerByteArrayOutputStream;
+import org.onosproject.xran.codecs.ber.BerTag;
+import org.onosproject.xran.codecs.ber.types.BerOctetString;
+
+import java.io.IOException;
+import java.io.InputStream;
+
+public class BerPrintableString extends BerOctetString {
+
+    public final static BerTag tag = new BerTag(BerTag.UNIVERSAL_CLASS, BerTag.PRIMITIVE, BerTag.PRINTABLE_STRING_TAG);
+    private static final long serialVersionUID = 1L;
+
+    public BerPrintableString() {
+    }
+
+    public BerPrintableString(byte[] value) {
+        this.value = value;
+    }
+
+    @JsonValue
+    @Override
+    public String toString() {
+        return new String(value);
+    }
+
+    @Override
+    public int encode(BerByteArrayOutputStream os, boolean withTag) throws IOException {
+
+        int codeLength = super.encode(os, false);
+
+        if (withTag) {
+            codeLength += tag.encode(os);
+        }
+
+        return codeLength;
+    }
+
+    @Override
+    public int decode(InputStream is, boolean withTag) throws IOException {
+
+        int codeLength = 0;
+
+        if (withTag) {
+            codeLength += tag.decodeAndCheck(is);
+        }
+
+        codeLength += super.decode(is, false);
+
+        return codeLength;
+    }
+
+}
diff --git a/src/main/java/org.onosproject.xran/codecs/ber/types/string/BerTeletexString.java b/src/main/java/org.onosproject.xran/codecs/ber/types/string/BerTeletexString.java
new file mode 100644
index 0000000..78e483b
--- /dev/null
+++ b/src/main/java/org.onosproject.xran/codecs/ber/types/string/BerTeletexString.java
@@ -0,0 +1,58 @@
+/* This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
+package org.onosproject.xran.codecs.ber.types.string;
+
+import com.fasterxml.jackson.annotation.JsonValue;
+import org.onosproject.xran.codecs.ber.BerByteArrayOutputStream;
+import org.onosproject.xran.codecs.ber.BerTag;
+import org.onosproject.xran.codecs.ber.types.BerOctetString;
+
+import java.io.IOException;
+import java.io.InputStream;
+
+public class BerTeletexString extends BerOctetString {
+
+    public final static BerTag tag = new BerTag(BerTag.UNIVERSAL_CLASS, BerTag.PRIMITIVE, BerTag.TELETEX_STRING_TAG);
+    private static final long serialVersionUID = 1L;
+
+    public BerTeletexString() {
+    }
+
+    public BerTeletexString(byte[] value) {
+        this.value = value;
+    }
+
+    @JsonValue
+    @Override
+    public String toString() {
+        return new String(value);
+    }
+
+    @Override
+    public int encode(BerByteArrayOutputStream os, boolean withTag) throws IOException {
+
+        int codeLength = super.encode(os, false);
+
+        if (withTag) {
+            codeLength += tag.encode(os);
+        }
+
+        return codeLength;
+    }
+
+    @Override
+    public int decode(InputStream is, boolean withTag) throws IOException {
+
+        int codeLength = 0;
+
+        if (withTag) {
+            codeLength += tag.decodeAndCheck(is);
+        }
+
+        codeLength += super.decode(is, false);
+
+        return codeLength;
+    }
+
+}
diff --git a/src/main/java/org.onosproject.xran/codecs/ber/types/string/BerUTF8String.java b/src/main/java/org.onosproject.xran/codecs/ber/types/string/BerUTF8String.java
new file mode 100644
index 0000000..7b107a4
--- /dev/null
+++ b/src/main/java/org.onosproject.xran/codecs/ber/types/string/BerUTF8String.java
@@ -0,0 +1,67 @@
+/* This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
+package org.onosproject.xran.codecs.ber.types.string;
+
+import com.fasterxml.jackson.annotation.JsonValue;
+import org.onosproject.xran.codecs.ber.BerByteArrayOutputStream;
+import org.onosproject.xran.codecs.ber.BerTag;
+import org.onosproject.xran.codecs.ber.types.BerOctetString;
+
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.UnsupportedEncodingException;
+
+public class BerUTF8String extends BerOctetString {
+
+    public final static BerTag tag = new BerTag(BerTag.UNIVERSAL_CLASS, BerTag.PRIMITIVE, BerTag.UTF8_STRING_TAG);
+    private static final long serialVersionUID = 1L;
+
+    public BerUTF8String() {
+    }
+
+    public BerUTF8String(byte[] value) {
+        this.value = value;
+    }
+
+    public BerUTF8String(String valueAsString) throws UnsupportedEncodingException {
+        value = valueAsString.getBytes("UTF-8");
+    }
+
+    @JsonValue
+    @Override
+    public String toString() {
+        try {
+            return new String(value, "UTF-8");
+        } catch (UnsupportedEncodingException e) {
+            return "Unsupported Encoding";
+        }
+    }
+
+    @Override
+    public int encode(BerByteArrayOutputStream os, boolean withTag) throws IOException {
+
+        int codeLength = super.encode(os, false);
+
+        if (withTag) {
+            codeLength += tag.encode(os);
+        }
+
+        return codeLength;
+    }
+
+    @Override
+    public int decode(InputStream is, boolean withTag) throws IOException {
+
+        int codeLength = 0;
+
+        if (withTag) {
+            codeLength += tag.decodeAndCheck(is);
+        }
+
+        codeLength += super.decode(is, false);
+
+        return codeLength;
+    }
+
+}
diff --git a/src/main/java/org.onosproject.xran/codecs/ber/types/string/BerUniversalString.java b/src/main/java/org.onosproject.xran/codecs/ber/types/string/BerUniversalString.java
new file mode 100644
index 0000000..06be21c
--- /dev/null
+++ b/src/main/java/org.onosproject.xran/codecs/ber/types/string/BerUniversalString.java
@@ -0,0 +1,58 @@
+/* This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
+package org.onosproject.xran.codecs.ber.types.string;
+
+import com.fasterxml.jackson.annotation.JsonValue;
+import org.onosproject.xran.codecs.ber.BerByteArrayOutputStream;
+import org.onosproject.xran.codecs.ber.BerTag;
+import org.onosproject.xran.codecs.ber.types.BerOctetString;
+
+import java.io.IOException;
+import java.io.InputStream;
+
+public class BerUniversalString extends BerOctetString {
+
+    public final static BerTag tag = new BerTag(BerTag.UNIVERSAL_CLASS, BerTag.PRIMITIVE, BerTag.UNIVERSAL_STRING_TAG);
+    private static final long serialVersionUID = 1L;
+
+    public BerUniversalString() {
+    }
+
+    public BerUniversalString(byte[] value) {
+        this.value = value;
+    }
+
+    @JsonValue
+    @Override
+    public String toString() {
+        return new String(value);
+    }
+
+    @Override
+    public int encode(BerByteArrayOutputStream os, boolean withTag) throws IOException {
+
+        int codeLength = super.encode(os, false);
+
+        if (withTag) {
+            codeLength += tag.encode(os);
+        }
+
+        return codeLength;
+    }
+
+    @Override
+    public int decode(InputStream is, boolean withTag) throws IOException {
+
+        int codeLength = 0;
+
+        if (withTag) {
+            codeLength += tag.decodeAndCheck(is);
+        }
+
+        codeLength += super.decode(is, false);
+
+        return codeLength;
+    }
+
+}
diff --git a/src/main/java/org.onosproject.xran/codecs/ber/types/string/BerVideotexString.java b/src/main/java/org.onosproject.xran/codecs/ber/types/string/BerVideotexString.java
new file mode 100644
index 0000000..e67d8ca
--- /dev/null
+++ b/src/main/java/org.onosproject.xran/codecs/ber/types/string/BerVideotexString.java
@@ -0,0 +1,58 @@
+/* This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
+package org.onosproject.xran.codecs.ber.types.string;
+
+import com.fasterxml.jackson.annotation.JsonValue;
+import org.onosproject.xran.codecs.ber.BerByteArrayOutputStream;
+import org.onosproject.xran.codecs.ber.BerTag;
+import org.onosproject.xran.codecs.ber.types.BerOctetString;
+
+import java.io.IOException;
+import java.io.InputStream;
+
+public class BerVideotexString extends BerOctetString {
+
+    public final static BerTag tag = new BerTag(BerTag.UNIVERSAL_CLASS, BerTag.PRIMITIVE, BerTag.VIDEOTEX_STRING_TAG);
+    private static final long serialVersionUID = 1L;
+
+    public BerVideotexString() {
+    }
+
+    public BerVideotexString(byte[] value) {
+        this.value = value;
+    }
+
+    @JsonValue
+    @Override
+    public String toString() {
+        return new String(value);
+    }
+
+    @Override
+    public int encode(BerByteArrayOutputStream os, boolean withTag) throws IOException {
+
+        int codeLength = super.encode(os, false);
+
+        if (withTag) {
+            codeLength += tag.encode(os);
+        }
+
+        return codeLength;
+    }
+
+    @Override
+    public int decode(InputStream is, boolean withTag) throws IOException {
+
+        int codeLength = 0;
+
+        if (withTag) {
+            codeLength += tag.decodeAndCheck(is);
+        }
+
+        codeLength += super.decode(is, false);
+
+        return codeLength;
+    }
+
+}
diff --git a/src/main/java/org.onosproject.xran/codecs/ber/types/string/BerVisibleString.java b/src/main/java/org.onosproject.xran/codecs/ber/types/string/BerVisibleString.java
new file mode 100644
index 0000000..ca7bfb3
--- /dev/null
+++ b/src/main/java/org.onosproject.xran/codecs/ber/types/string/BerVisibleString.java
@@ -0,0 +1,83 @@
+/* This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
+package org.onosproject.xran.codecs.ber.types.string;
+
+import com.fasterxml.jackson.annotation.JsonValue;
+import org.onosproject.xran.codecs.ber.BerByteArrayOutputStream;
+import org.onosproject.xran.codecs.ber.BerLength;
+import org.onosproject.xran.codecs.ber.BerTag;
+import org.onosproject.xran.codecs.ber.internal.Util;
+
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.Serializable;
+
+public class BerVisibleString implements Serializable {
+
+    public final static BerTag tag = new BerTag(BerTag.UNIVERSAL_CLASS, BerTag.PRIMITIVE, BerTag.VISIBLE_STRING_TAG);
+    private static final long serialVersionUID = 1L;
+    public byte[] value;
+
+    public BerVisibleString() {
+    }
+
+    public BerVisibleString(byte[] value) {
+        this.value = value;
+    }
+
+    public BerVisibleString(String valueAsString) {
+        value = valueAsString.getBytes();
+    }
+
+    public int encode(BerByteArrayOutputStream os) throws IOException {
+        return encode(os, true);
+    }
+
+    public int encode(BerByteArrayOutputStream os, boolean withTag) throws IOException {
+
+        os.write(value);
+        int codeLength = value.length;
+
+        codeLength += BerLength.encodeLength(os, codeLength);
+
+        if (withTag) {
+            codeLength += tag.encode(os);
+        }
+
+        return codeLength;
+    }
+
+    public int decode(InputStream is) throws IOException {
+        return decode(is, true);
+    }
+
+    public int decode(InputStream is, boolean withTag) throws IOException {
+
+        int codeLength = 0;
+
+        if (withTag) {
+            codeLength += tag.decodeAndCheck(is);
+        }
+
+        BerLength length = new BerLength();
+        codeLength += length.decode(is);
+
+        value = new byte[length.val];
+
+        if (length.val != 0) {
+            Util.readFully(is, value);
+            codeLength += length.val;
+        }
+
+        return codeLength;
+
+    }
+
+    @JsonValue
+    @Override
+    public String toString() {
+        return new String(value);
+    }
+
+}
diff --git a/src/main/java/org.onosproject.xran/codecs/pdu/BearerAdmissionRequest.java b/src/main/java/org.onosproject.xran/codecs/pdu/BearerAdmissionRequest.java
index 7f86f7c..7fa0f40 100644
--- a/src/main/java/org.onosproject.xran/codecs/pdu/BearerAdmissionRequest.java
+++ b/src/main/java/org.onosproject.xran/codecs/pdu/BearerAdmissionRequest.java
@@ -4,10 +4,11 @@
 
 package org.onosproject.xran.codecs.pdu;
 
-import org.openmuc.jasn1.ber.BerByteArrayOutputStream;
-import org.openmuc.jasn1.ber.BerLength;
-import org.openmuc.jasn1.ber.BerTag;
-import org.openmuc.jasn1.ber.types.BerInteger;
+import com.fasterxml.jackson.annotation.JsonIgnore;
+import org.onosproject.xran.codecs.ber.BerByteArrayOutputStream;
+import org.onosproject.xran.codecs.ber.BerLength;
+import org.onosproject.xran.codecs.ber.BerTag;
+import org.onosproject.xran.codecs.ber.types.BerInteger;
 import org.onosproject.xran.codecs.api.CRNTI;
 import org.onosproject.xran.codecs.api.ECGI;
 import org.onosproject.xran.codecs.api.ERABParams;
@@ -23,6 +24,7 @@
 
 	public static final BerTag tag = new BerTag(BerTag.UNIVERSAL_CLASS, BerTag.CONSTRUCTED, 16);
 
+	@JsonIgnore
 	public byte[] code = null;
 	private CRNTI crnti = null;
 	private ECGI ecgi = null;
@@ -217,7 +219,7 @@
 			sb.append("\t");
 		}
 		if (crnti != null) {
-			sb.append("\"crnti\": ").append(crnti);
+			sb.append("crnti: ").append(crnti);
 		}
 		
 		sb.append(",\n");
@@ -225,7 +227,7 @@
 			sb.append("\t");
 		}
 		if (ecgi != null) {
-			sb.append("\"ecgi\": ");
+			sb.append("ecgi: ");
 			ecgi.appendAsString(sb, indentLevel + 1);
 		}
 		
@@ -234,7 +236,7 @@
 			sb.append("\t");
 		}
 		if (ueAmbr != null) {
-			sb.append("\"ueAmbr\": ");
+			sb.append("ueAmbr: ");
 			ueAmbr.appendAsString(sb, indentLevel + 1);
 		}
 		
@@ -243,7 +245,7 @@
 			sb.append("\t");
 		}
 		if (numErabs != null) {
-			sb.append("\"numErabs\": ").append(numErabs);
+			sb.append("numErabs: ").append(numErabs);
 		}
 		
 		sb.append(",\n");
@@ -251,7 +253,7 @@
 			sb.append("\t");
 		}
 		if (erabParams != null) {
-			sb.append("\"erabParams\": ");
+			sb.append("erabParams: ");
 			erabParams.appendAsString(sb, indentLevel + 1);
 		}
 		
diff --git a/src/main/java/org.onosproject.xran/codecs/pdu/BearerAdmissionResponse.java b/src/main/java/org.onosproject.xran/codecs/pdu/BearerAdmissionResponse.java
index 15c84e6..a4dfeb0 100644
--- a/src/main/java/org.onosproject.xran/codecs/pdu/BearerAdmissionResponse.java
+++ b/src/main/java/org.onosproject.xran/codecs/pdu/BearerAdmissionResponse.java
@@ -4,12 +4,13 @@
 
 package org.onosproject.xran.codecs.pdu;
 
+import com.fasterxml.jackson.annotation.JsonIgnore;
 import org.onosproject.xran.codecs.api.*;
-import org.openmuc.jasn1.ber.BerByteArrayOutputStream;
-import org.openmuc.jasn1.ber.BerLength;
-import org.openmuc.jasn1.ber.BerTag;
-import org.openmuc.jasn1.ber.types.BerInteger;
-import org.openmuc.jasn1.ber.types.string.BerUTF8String;
+import org.onosproject.xran.codecs.ber.BerByteArrayOutputStream;
+import org.onosproject.xran.codecs.ber.BerLength;
+import org.onosproject.xran.codecs.ber.BerTag;
+import org.onosproject.xran.codecs.ber.types.BerInteger;
+import org.onosproject.xran.codecs.ber.types.string.BerUTF8String;
 
 import java.io.IOException;
 import java.io.InputStream;
@@ -22,6 +23,7 @@
 
 	public static final BerTag tag = new BerTag(BerTag.UNIVERSAL_CLASS, BerTag.CONSTRUCTED, 16);
 
+	@JsonIgnore
 	public byte[] code = null;
 	private CRNTI crnti = null;
 	private ECGI ecgi = null;
@@ -193,7 +195,7 @@
 			sb.append("\t");
 		}
 		if (crnti != null) {
-			sb.append("\"crnti\": ").append(crnti);
+			sb.append("crnti: ").append(crnti);
 		}
 		
 		sb.append(",\n");
@@ -201,7 +203,7 @@
 			sb.append("\t");
 		}
 		if (ecgi != null) {
-			sb.append("\"ecgi\": ");
+			sb.append("ecgi: ");
 			ecgi.appendAsString(sb, indentLevel + 1);
 		}
 		
@@ -210,7 +212,7 @@
 			sb.append("\t");
 		}
 		if (numErabList != null) {
-			sb.append("\"numErabList\": ").append(numErabList);
+			sb.append("numErabList: ").append(numErabList);
 		}
 		
 		sb.append(",\n");
@@ -218,7 +220,7 @@
 			sb.append("\t");
 		}
 		if (erabResponse != null) {
-			sb.append("\"erabResponse\": ");
+			sb.append("erabResponse: ");
 			erabResponse.appendAsString(sb, indentLevel + 1);
 		}
 		
diff --git a/src/main/java/org.onosproject.xran/codecs/pdu/BearerAdmissionStatus.java b/src/main/java/org.onosproject.xran/codecs/pdu/BearerAdmissionStatus.java
index 16e85e1..f9c6476 100644
--- a/src/main/java/org.onosproject.xran/codecs/pdu/BearerAdmissionStatus.java
+++ b/src/main/java/org.onosproject.xran/codecs/pdu/BearerAdmissionStatus.java
@@ -4,10 +4,11 @@
 
 package org.onosproject.xran.codecs.pdu;
 
-import org.openmuc.jasn1.ber.BerByteArrayOutputStream;
-import org.openmuc.jasn1.ber.BerLength;
-import org.openmuc.jasn1.ber.BerTag;
-import org.openmuc.jasn1.ber.types.BerInteger;
+import com.fasterxml.jackson.annotation.JsonIgnore;
+import org.onosproject.xran.codecs.ber.BerByteArrayOutputStream;
+import org.onosproject.xran.codecs.ber.BerLength;
+import org.onosproject.xran.codecs.ber.BerTag;
+import org.onosproject.xran.codecs.ber.types.BerInteger;
 import org.onosproject.xran.codecs.api.CRNTI;
 import org.onosproject.xran.codecs.api.ECGI;
 import org.onosproject.xran.codecs.api.ERABResponse;
@@ -22,6 +23,7 @@
 
 	public static final BerTag tag = new BerTag(BerTag.UNIVERSAL_CLASS, BerTag.CONSTRUCTED, 16);
 
+	@JsonIgnore
 	public byte[] code = null;
 	private CRNTI crnti = null;
 	private ECGI ecgi = null;
@@ -193,7 +195,7 @@
 			sb.append("\t");
 		}
 		if (crnti != null) {
-			sb.append("\"crnti\": ").append(crnti);
+			sb.append("crnti: ").append(crnti);
 		}
 		
 		sb.append(",\n");
@@ -201,7 +203,7 @@
 			sb.append("\t");
 		}
 		if (ecgi != null) {
-			sb.append("\"ecgi\": ");
+			sb.append("ecgi: ");
 			ecgi.appendAsString(sb, indentLevel + 1);
 		}
 		
@@ -210,7 +212,7 @@
 			sb.append("\t");
 		}
 		if (numErabs != null) {
-			sb.append("\"numErabs\": ").append(numErabs);
+			sb.append("numErabs: ").append(numErabs);
 		}
 		
 		sb.append(",\n");
@@ -218,7 +220,7 @@
 			sb.append("\t");
 		}
 		if (erabResponse != null) {
-			sb.append("\"erabResponse\": ");
+			sb.append("erabResponse: ");
 			erabResponse.appendAsString(sb, indentLevel + 1);
 		}
 		
diff --git a/src/main/java/org.onosproject.xran/codecs/pdu/BearerReleaseInd.java b/src/main/java/org.onosproject.xran/codecs/pdu/BearerReleaseInd.java
index 89cfa2d..055c8be 100644
--- a/src/main/java/org.onosproject.xran/codecs/pdu/BearerReleaseInd.java
+++ b/src/main/java/org.onosproject.xran/codecs/pdu/BearerReleaseInd.java
@@ -4,10 +4,12 @@
 
 package org.onosproject.xran.codecs.pdu;
 
-import org.openmuc.jasn1.ber.BerByteArrayOutputStream;
-import org.openmuc.jasn1.ber.BerLength;
-import org.openmuc.jasn1.ber.BerTag;
-import org.openmuc.jasn1.ber.types.BerInteger;
+import com.fasterxml.jackson.annotation.JsonIgnore;
+import com.fasterxml.jackson.annotation.JsonValue;
+import org.onosproject.xran.codecs.ber.BerByteArrayOutputStream;
+import org.onosproject.xran.codecs.ber.BerLength;
+import org.onosproject.xran.codecs.ber.BerTag;
+import org.onosproject.xran.codecs.ber.types.BerInteger;
 import org.onosproject.xran.codecs.api.CRNTI;
 import org.onosproject.xran.codecs.api.ECGI;
 import org.onosproject.xran.codecs.api.ERABID;
@@ -28,6 +30,7 @@
 		private static final long serialVersionUID = 1L;
 
 		public static final BerTag tag = new BerTag(BerTag.UNIVERSAL_CLASS, BerTag.CONSTRUCTED, 16);
+		@JsonIgnore
 		public byte[] code = null;
 		private List<ERABID> seqOf = null;
 
@@ -39,6 +42,7 @@
 			this.code = code;
 		}
 
+		@JsonValue
 		public List<ERABID> getERABID() {
 			if (seqOf == null) {
 				seqOf = new ArrayList<ERABID>();
@@ -151,7 +155,7 @@
 
 	public static final BerTag tag = new BerTag(BerTag.UNIVERSAL_CLASS, BerTag.CONSTRUCTED, 16);
 
-	public byte[] code = null;
+	@JsonIgnore public byte[] code = null;
 	private CRNTI crnti = null;
 	private ECGI ecgi = null;
 	private BerInteger numErabs = null;
@@ -322,7 +326,7 @@
 			sb.append("\t");
 		}
 		if (crnti != null) {
-			sb.append("\"crnti\": ").append(crnti);
+			sb.append("crnti: ").append(crnti);
 		}
 		
 		sb.append(",\n");
@@ -330,7 +334,7 @@
 			sb.append("\t");
 		}
 		if (ecgi != null) {
-			sb.append("\"ecgi\": ");
+			sb.append("ecgi: ");
 			ecgi.appendAsString(sb, indentLevel + 1);
 		}
 		
@@ -339,7 +343,7 @@
 			sb.append("\t");
 		}
 		if (numErabs != null) {
-			sb.append("\"numErabs\": ").append(numErabs);
+			sb.append("numErabs: ").append(numErabs);
 		}
 		
 		sb.append(",\n");
@@ -347,7 +351,7 @@
 			sb.append("\t");
 		}
 		if (erabIds != null) {
-			sb.append("\"erabIds\": ");
+			sb.append("erabIds: ");
 			erabIds.appendAsString(sb, indentLevel + 1);
 		}
 		
diff --git a/src/main/java/org.onosproject.xran/codecs/pdu/CellConfigReport.java b/src/main/java/org.onosproject.xran/codecs/pdu/CellConfigReport.java
index c858d2e..c45760d 100644
--- a/src/main/java/org.onosproject.xran/codecs/pdu/CellConfigReport.java
+++ b/src/main/java/org.onosproject.xran/codecs/pdu/CellConfigReport.java
@@ -4,11 +4,13 @@
 
 package org.onosproject.xran.codecs.pdu;
 
-import org.openmuc.jasn1.ber.BerByteArrayOutputStream;
-import org.openmuc.jasn1.ber.BerLength;
-import org.openmuc.jasn1.ber.BerTag;
-import org.openmuc.jasn1.ber.types.BerBoolean;
-import org.openmuc.jasn1.ber.types.BerInteger;
+import com.fasterxml.jackson.annotation.JsonIgnore;
+import com.fasterxml.jackson.annotation.JsonValue;
+import org.onosproject.xran.codecs.ber.BerByteArrayOutputStream;
+import org.onosproject.xran.codecs.ber.BerLength;
+import org.onosproject.xran.codecs.ber.BerTag;
+import org.onosproject.xran.codecs.ber.types.BerBoolean;
+import org.onosproject.xran.codecs.ber.types.BerInteger;
 import org.onosproject.xran.codecs.api.*;
 
 import java.io.IOException;
@@ -27,6 +29,7 @@
 		private static final long serialVersionUID = 1L;
 
 		public static final BerTag tag = new BerTag(BerTag.UNIVERSAL_CLASS, BerTag.CONSTRUCTED, 16);
+		@JsonIgnore
 		public byte[] code = null;
 		private List<CandScell> seqOf = null;
 
@@ -38,6 +41,7 @@
 			this.code = code;
 		}
 
+		@JsonValue
 		public List<CandScell> getCandScells() {
 			if (seqOf == null) {
 				seqOf = new ArrayList<CandScell>();
@@ -154,7 +158,7 @@
 
 	public static final BerTag tag = new BerTag(BerTag.UNIVERSAL_CLASS, BerTag.CONSTRUCTED, 16);
 
-	public byte[] code = null;
+	@JsonIgnore public byte[] code = null;
 	private ECGI ecgi = null;
 	private PhysCellId pci = null;
 	private CandScells candScells = null;
@@ -599,7 +603,7 @@
 			sb.append("\t");
 		}
 		if (ecgi != null) {
-			sb.append("\"ecgi\": ");
+			sb.append("ecgi: ");
 			ecgi.appendAsString(sb, indentLevel + 1);
 		}
 		
@@ -608,7 +612,7 @@
 			sb.append("\t");
 		}
 		if (pci != null) {
-			sb.append("\"pci\": ").append(pci);
+			sb.append("pci: ").append(pci);
 		}
 		
 		sb.append(",\n");
@@ -616,7 +620,7 @@
 			sb.append("\t");
 		}
 		if (candScells != null) {
-			sb.append("\"candScells\": ");
+			sb.append("candScells: ");
 			candScells.appendAsString(sb, indentLevel + 1);
 		}
 		
@@ -625,7 +629,7 @@
 			sb.append("\t");
 		}
 		if (earfcnDl != null) {
-			sb.append("\"earfcnDl\": ").append(earfcnDl);
+			sb.append("earfcnDl: ").append(earfcnDl);
 		}
 		
 		sb.append(",\n");
@@ -633,7 +637,7 @@
 			sb.append("\t");
 		}
 		if (earfcnUl != null) {
-			sb.append("\"earfcnUl\": ").append(earfcnUl);
+			sb.append("earfcnUl: ").append(earfcnUl);
 		}
 		
 		sb.append(",\n");
@@ -641,7 +645,7 @@
 			sb.append("\t");
 		}
 		if (rbsPerTtiDl != null) {
-			sb.append("\"rbsPerTtiDl\": ").append(rbsPerTtiDl);
+			sb.append("rbsPerTtiDl: ").append(rbsPerTtiDl);
 		}
 		
 		sb.append(",\n");
@@ -649,7 +653,7 @@
 			sb.append("\t");
 		}
 		if (rbsPerTtiUl != null) {
-			sb.append("\"rbsPerTtiUl\": ").append(rbsPerTtiUl);
+			sb.append("rbsPerTtiUl: ").append(rbsPerTtiUl);
 		}
 		
 		sb.append(",\n");
@@ -657,7 +661,7 @@
 			sb.append("\t");
 		}
 		if (numTxAntenna != null) {
-			sb.append("\"numTxAntenna\": ").append(numTxAntenna);
+			sb.append("numTxAntenna: ").append(numTxAntenna);
 		}
 		
 		sb.append(",\n");
@@ -665,7 +669,7 @@
 			sb.append("\t");
 		}
 		if (duplexMode != null) {
-			sb.append("\"duplexMode\": ").append(duplexMode);
+			sb.append("duplexMode: ").append(duplexMode);
 		}
 		
 		if (tddConfig != null) {
@@ -673,7 +677,7 @@
 			for (int i = 0; i < indentLevel + 1; i++) {
 				sb.append("\t");
 			}
-			sb.append("\"tddConfig\": ").append(tddConfig);
+			sb.append("tddConfig: ").append(tddConfig);
 		}
 		
 		if (tddSplSfConfig != null) {
@@ -681,7 +685,7 @@
 			for (int i = 0; i < indentLevel + 1; i++) {
 				sb.append("\t");
 			}
-			sb.append("\"tddSplSfConfig\": ").append(tddSplSfConfig);
+			sb.append("tddSplSfConfig: ").append(tddSplSfConfig);
 		}
 		
 		sb.append(",\n");
@@ -689,7 +693,7 @@
 			sb.append("\t");
 		}
 		if (maxNumConnectedUes != null) {
-			sb.append("\"maxNumConnectedUes\": ").append(maxNumConnectedUes);
+			sb.append("maxNumConnectedUes: ").append(maxNumConnectedUes);
 		}
 		
 		sb.append(",\n");
@@ -697,7 +701,7 @@
 			sb.append("\t");
 		}
 		if (maxNumConnectedBearers != null) {
-			sb.append("\"maxNumConnectedBearers\": ").append(maxNumConnectedBearers);
+			sb.append("maxNumConnectedBearers: ").append(maxNumConnectedBearers);
 		}
 		
 		sb.append(",\n");
@@ -705,7 +709,7 @@
 			sb.append("\t");
 		}
 		if (maxNumUesSchedPerTtiDl != null) {
-			sb.append("\"maxNumUesSchedPerTtiDl\": ").append(maxNumUesSchedPerTtiDl);
+			sb.append("maxNumUesSchedPerTtiDl: ").append(maxNumUesSchedPerTtiDl);
 		}
 
 		sb.append(",\n");
@@ -713,7 +717,7 @@
 			sb.append("\t");
 		}
 		if (maxNumUesSchedPerTtiUl != null) {
-			sb.append("\"maxNumUesSchedPerTtiUl\": ").append(maxNumUesSchedPerTtiUl);
+			sb.append("maxNumUesSchedPerTtiUl: ").append(maxNumUesSchedPerTtiUl);
 		}
 		
 		sb.append(",\n");
@@ -721,7 +725,7 @@
 			sb.append("\t");
 		}
 		if (dlfsSchedEnable != null) {
-			sb.append("\"dlfsSchedEnable\": ").append(dlfsSchedEnable);
+			sb.append("dlfsSchedEnable: ").append(dlfsSchedEnable);
 		}
 
 		sb.append("\n");
diff --git a/src/main/java/org.onosproject.xran/codecs/pdu/CellConfigRequest.java b/src/main/java/org.onosproject.xran/codecs/pdu/CellConfigRequest.java
index d2a8b69..4f5e20b 100644
--- a/src/main/java/org.onosproject.xran/codecs/pdu/CellConfigRequest.java
+++ b/src/main/java/org.onosproject.xran/codecs/pdu/CellConfigRequest.java
@@ -4,11 +4,12 @@
 
 package org.onosproject.xran.codecs.pdu;
 
-import org.openmuc.jasn1.ber.BerByteArrayOutputStream;
-import org.openmuc.jasn1.ber.BerLength;
-import org.openmuc.jasn1.ber.BerTag;
+import com.fasterxml.jackson.annotation.JsonIgnore;
+import org.onosproject.xran.codecs.ber.BerByteArrayOutputStream;
+import org.onosproject.xran.codecs.ber.BerLength;
+import org.onosproject.xran.codecs.ber.BerTag;
 import org.onosproject.xran.codecs.api.ECGI;
-import org.openmuc.jasn1.ber.types.string.BerUTF8String;
+import org.onosproject.xran.codecs.ber.types.string.BerUTF8String;
 
 import java.io.IOException;
 import java.io.InputStream;
@@ -21,6 +22,7 @@
 
 	public static final BerTag tag = new BerTag(BerTag.UNIVERSAL_CLASS, BerTag.CONSTRUCTED, 16);
 
+	@JsonIgnore
 	public byte[] code = null;
 	private ECGI ecgi = null;
 	
@@ -123,7 +125,7 @@
 			sb.append("\t");
 		}
 		if (ecgi != null) {
-			sb.append("\"ecgi\": ");
+			sb.append("ecgi: ");
 			ecgi.appendAsString(sb, indentLevel + 1);
 		}
 		
diff --git a/src/main/java/org.onosproject.xran/codecs/pdu/HOComplete.java b/src/main/java/org.onosproject.xran/codecs/pdu/HOComplete.java
index 7a4290a..68ae5c1 100644
--- a/src/main/java/org.onosproject.xran/codecs/pdu/HOComplete.java
+++ b/src/main/java/org.onosproject.xran/codecs/pdu/HOComplete.java
@@ -4,11 +4,12 @@
 
 package org.onosproject.xran.codecs.pdu;
 
+import com.fasterxml.jackson.annotation.JsonIgnore;
 import org.onosproject.xran.codecs.api.CRNTI;
 import org.onosproject.xran.codecs.api.ECGI;
-import org.openmuc.jasn1.ber.BerByteArrayOutputStream;
-import org.openmuc.jasn1.ber.BerLength;
-import org.openmuc.jasn1.ber.BerTag;
+import org.onosproject.xran.codecs.ber.BerByteArrayOutputStream;
+import org.onosproject.xran.codecs.ber.BerLength;
+import org.onosproject.xran.codecs.ber.BerTag;
 
 import java.io.IOException;
 import java.io.InputStream;
@@ -21,6 +22,7 @@
 
 	public static final BerTag tag = new BerTag(BerTag.UNIVERSAL_CLASS, BerTag.CONSTRUCTED, 16);
 
+	@JsonIgnore
 	public byte[] code = null;
 	private ECGI ecgiT = null;
 	private ECGI ecgiS = null;
@@ -169,7 +171,7 @@
 			sb.append("\t");
 		}
 		if (ecgiT != null) {
-			sb.append("\"ecgiT\": ");
+			sb.append("ecgiT: ");
 			ecgiT.appendAsString(sb, indentLevel + 1);
 		}
 		
@@ -178,7 +180,7 @@
 			sb.append("\t");
 		}
 		if (ecgiS != null) {
-			sb.append("\"ecgiS\": ");
+			sb.append("ecgiS: ");
 			ecgiS.appendAsString(sb, indentLevel + 1);
 		}
 		
@@ -187,7 +189,7 @@
 			sb.append("\t");
 		}
 		if (crntiNew != null) {
-			sb.append("\"crntiNew\": ").append(crntiNew);
+			sb.append("crntiNew: ").append(crntiNew);
 		}
 		
 		sb.append("\n");
diff --git a/src/main/java/org.onosproject.xran/codecs/pdu/HOFailure.java b/src/main/java/org.onosproject.xran/codecs/pdu/HOFailure.java
index d0d2c90..ac42dcd 100644
--- a/src/main/java/org.onosproject.xran/codecs/pdu/HOFailure.java
+++ b/src/main/java/org.onosproject.xran/codecs/pdu/HOFailure.java
@@ -4,12 +4,13 @@
 
 package org.onosproject.xran.codecs.pdu;
 
+import com.fasterxml.jackson.annotation.JsonIgnore;
 import org.onosproject.xran.codecs.api.CRNTI;
 import org.onosproject.xran.codecs.api.ECGI;
 import org.onosproject.xran.codecs.api.HOFailureCause;
-import org.openmuc.jasn1.ber.BerByteArrayOutputStream;
-import org.openmuc.jasn1.ber.BerLength;
-import org.openmuc.jasn1.ber.BerTag;
+import org.onosproject.xran.codecs.ber.BerByteArrayOutputStream;
+import org.onosproject.xran.codecs.ber.BerLength;
+import org.onosproject.xran.codecs.ber.BerTag;
 
 import java.io.IOException;
 import java.io.InputStream;
@@ -21,6 +22,7 @@
 
 	public static final BerTag tag = new BerTag(BerTag.UNIVERSAL_CLASS, BerTag.CONSTRUCTED, 16);
 
+	@JsonIgnore
 	public byte[] code = null;
 	private CRNTI crnti = null;
 	private ECGI ecgi = null;
@@ -169,7 +171,7 @@
 			sb.append("\t");
 		}
 		if (crnti != null) {
-			sb.append("\"crnti\": ").append(crnti);
+			sb.append("crnti: ").append(crnti);
 		}
 		
 		sb.append(",\n");
@@ -177,7 +179,7 @@
 			sb.append("\t");
 		}
 		if (ecgi != null) {
-			sb.append("\"ecgi\": ");
+			sb.append("ecgi: ");
 			ecgi.appendAsString(sb, indentLevel + 1);
 		}
 		
@@ -186,7 +188,7 @@
 			sb.append("\t");
 		}
 		if (cause != null) {
-			sb.append("\"cause\": ").append(cause);
+			sb.append("cause: ").append(cause);
 		}
 		
 		sb.append("\n");
diff --git a/src/main/java/org.onosproject.xran/codecs/pdu/HORequest.java b/src/main/java/org.onosproject.xran/codecs/pdu/HORequest.java
index f6a3076..38218d7 100644
--- a/src/main/java/org.onosproject.xran/codecs/pdu/HORequest.java
+++ b/src/main/java/org.onosproject.xran/codecs/pdu/HORequest.java
@@ -4,12 +4,13 @@
 
 package org.onosproject.xran.codecs.pdu;
 
+import com.fasterxml.jackson.annotation.JsonIgnore;
 import org.onosproject.xran.codecs.api.CRNTI;
 import org.onosproject.xran.codecs.api.ECGI;
-import org.openmuc.jasn1.ber.BerByteArrayOutputStream;
-import org.openmuc.jasn1.ber.BerLength;
-import org.openmuc.jasn1.ber.BerTag;
-import org.openmuc.jasn1.ber.types.string.BerUTF8String;
+import org.onosproject.xran.codecs.ber.BerByteArrayOutputStream;
+import org.onosproject.xran.codecs.ber.BerLength;
+import org.onosproject.xran.codecs.ber.BerTag;
+import org.onosproject.xran.codecs.ber.types.string.BerUTF8String;
 
 import java.io.IOException;
 import java.io.InputStream;
@@ -22,6 +23,7 @@
 
 	public static final BerTag tag = new BerTag(BerTag.UNIVERSAL_CLASS, BerTag.CONSTRUCTED, 16);
 
+	@JsonIgnore
 	public byte[] code = null;
 	private CRNTI crnti = null;
 	private ECGI ecgiS = null;
@@ -170,7 +172,7 @@
 			sb.append("\t");
 		}
 		if (crnti != null) {
-			sb.append("\"crnti\": ").append(crnti);
+			sb.append("crnti: ").append(crnti);
 		}
 		
 		sb.append(",\n");
@@ -178,7 +180,7 @@
 			sb.append("\t");
 		}
 		if (ecgiS != null) {
-			sb.append("\"ecgiS\": ");
+			sb.append("ecgiS: ");
 			ecgiS.appendAsString(sb, indentLevel + 1);
 		}
 		
@@ -187,7 +189,7 @@
 			sb.append("\t");
 		}
 		if (ecgiT != null) {
-			sb.append("\"ecgiT\": ");
+			sb.append("ecgiT: ");
 			ecgiT.appendAsString(sb, indentLevel + 1);
 		}
 		
diff --git a/src/main/java/org.onosproject.xran/codecs/pdu/L2MeasConfig.java b/src/main/java/org.onosproject.xran/codecs/pdu/L2MeasConfig.java
index f0de6d1..4e1f958 100644
--- a/src/main/java/org.onosproject.xran/codecs/pdu/L2MeasConfig.java
+++ b/src/main/java/org.onosproject.xran/codecs/pdu/L2MeasConfig.java
@@ -4,12 +4,13 @@
 
 package org.onosproject.xran.codecs.pdu;
 
+import com.fasterxml.jackson.annotation.JsonIgnore;
 import org.onosproject.xran.codecs.api.ECGI;
-import org.openmuc.jasn1.ber.BerByteArrayOutputStream;
-import org.openmuc.jasn1.ber.BerLength;
-import org.openmuc.jasn1.ber.BerTag;
-import org.openmuc.jasn1.ber.types.BerInteger;
-import org.openmuc.jasn1.ber.types.string.BerUTF8String;
+import org.onosproject.xran.codecs.ber.BerByteArrayOutputStream;
+import org.onosproject.xran.codecs.ber.BerLength;
+import org.onosproject.xran.codecs.ber.BerTag;
+import org.onosproject.xran.codecs.ber.types.BerInteger;
+import org.onosproject.xran.codecs.ber.types.string.BerUTF8String;
 
 import java.io.IOException;
 import java.io.InputStream;
@@ -22,6 +23,7 @@
 
 	public static final BerTag tag = new BerTag(BerTag.UNIVERSAL_CLASS, BerTag.CONSTRUCTED, 16);
 
+	@JsonIgnore
 	public byte[] code = null;
 	private ECGI ecgi = null;
 	private BerInteger  reportIntervalMs = null;
@@ -147,7 +149,7 @@
 			sb.append("\t");
 		}
 		if (ecgi != null) {
-			sb.append("\"ecgi\": ");
+			sb.append("ecgi: ");
 			ecgi.appendAsString(sb, indentLevel + 1);
 		}
 		
@@ -156,7 +158,7 @@
 			sb.append("\t");
 		}
 		if (reportIntervalMs != null) {
-			sb.append("\"reportIntervalMs\": ").append(reportIntervalMs);
+			sb.append("reportIntervalMs: ").append(reportIntervalMs);
 		}
 		
 		sb.append("\n");
diff --git a/src/main/java/org.onosproject.xran/codecs/pdu/PDCPMeasReportPerUe.java b/src/main/java/org.onosproject.xran/codecs/pdu/PDCPMeasReportPerUe.java
index d272974..b2ed3a3 100644
--- a/src/main/java/org.onosproject.xran/codecs/pdu/PDCPMeasReportPerUe.java
+++ b/src/main/java/org.onosproject.xran/codecs/pdu/PDCPMeasReportPerUe.java
@@ -14,12 +14,14 @@
 import java.math.BigInteger;
 import java.io.Serializable;
 
+import com.fasterxml.jackson.annotation.JsonIgnore;
+import com.fasterxml.jackson.annotation.JsonValue;
 import org.onosproject.xran.codecs.api.CRNTI;
 import org.onosproject.xran.codecs.api.ECGI;
 import org.onosproject.xran.codecs.api.QCI;
-import org.openmuc.jasn1.ber.*;
-import org.openmuc.jasn1.ber.types.*;
-import org.openmuc.jasn1.ber.types.string.*;
+import org.onosproject.xran.codecs.ber.*;
+import org.onosproject.xran.codecs.ber.types.*;
+import org.onosproject.xran.codecs.ber.types.string.*;
 
 
 
@@ -32,6 +34,7 @@
 		private static final long serialVersionUID = 1L;
 
 		public static final BerTag tag = new BerTag(BerTag.UNIVERSAL_CLASS, BerTag.CONSTRUCTED, 16);
+		@JsonIgnore
 		public byte[] code = null;
 		private List<QCI> seqOf = null;
 
@@ -43,6 +46,7 @@
 			this.code = code;
 		}
 
+		@JsonValue
 		public List<QCI> getQCI() {
 			if (seqOf == null) {
 				seqOf = new ArrayList<QCI>();
@@ -161,7 +165,7 @@
 		private static final long serialVersionUID = 1L;
 
 		public static final BerTag tag = new BerTag(BerTag.UNIVERSAL_CLASS, BerTag.CONSTRUCTED, 16);
-		public byte[] code = null;
+		@JsonIgnore public byte[] code = null;
 		private List<BerInteger> seqOf = null;
 
 		public DataVolDl() {
@@ -172,7 +176,7 @@
 			this.code = code;
 		}
 
-		public List<BerInteger> getBerInteger() {
+		@JsonValue public List<BerInteger> getBerInteger() {
 			if (seqOf == null) {
 				seqOf = new ArrayList<BerInteger>();
 			}
@@ -290,7 +294,7 @@
 		private static final long serialVersionUID = 1L;
 
 		public static final BerTag tag = new BerTag(BerTag.UNIVERSAL_CLASS, BerTag.CONSTRUCTED, 16);
-		public byte[] code = null;
+		@JsonIgnore public byte[] code = null;
 		private List<BerInteger> seqOf = null;
 
 		public DataVolUl() {
@@ -301,7 +305,7 @@
 			this.code = code;
 		}
 
-		public List<BerInteger> getBerInteger() {
+		@JsonValue public List<BerInteger> getBerInteger() {
 			if (seqOf == null) {
 				seqOf = new ArrayList<BerInteger>();
 			}
@@ -419,7 +423,7 @@
 		private static final long serialVersionUID = 1L;
 
 		public static final BerTag tag = new BerTag(BerTag.UNIVERSAL_CLASS, BerTag.CONSTRUCTED, 16);
-		public byte[] code = null;
+		@JsonIgnore public byte[] code = null;
 		private List<BerInteger> seqOf = null;
 
 		public PktDelayDl() {
@@ -430,7 +434,7 @@
 			this.code = code;
 		}
 
-		public List<BerInteger> getBerInteger() {
+		@JsonValue public List<BerInteger> getBerInteger() {
 			if (seqOf == null) {
 				seqOf = new ArrayList<BerInteger>();
 			}
@@ -548,7 +552,7 @@
 		private static final long serialVersionUID = 1L;
 
 		public static final BerTag tag = new BerTag(BerTag.UNIVERSAL_CLASS, BerTag.CONSTRUCTED, 16);
-		public byte[] code = null;
+		@JsonIgnore public byte[] code = null;
 		private List<BerInteger> seqOf = null;
 
 		public PktDelayUl() {
@@ -559,7 +563,7 @@
 			this.code = code;
 		}
 
-		public List<BerInteger> getBerInteger() {
+		@JsonValue public List<BerInteger> getBerInteger() {
 			if (seqOf == null) {
 				seqOf = new ArrayList<BerInteger>();
 			}
@@ -677,7 +681,7 @@
 		private static final long serialVersionUID = 1L;
 
 		public static final BerTag tag = new BerTag(BerTag.UNIVERSAL_CLASS, BerTag.CONSTRUCTED, 16);
-		public byte[] code = null;
+		@JsonIgnore public byte[] code = null;
 		private List<BerInteger> seqOf = null;
 
 		public PktDiscardRateDl() {
@@ -688,7 +692,7 @@
 			this.code = code;
 		}
 
-		public List<BerInteger> getBerInteger() {
+		@JsonValue public List<BerInteger> getBerInteger() {
 			if (seqOf == null) {
 				seqOf = new ArrayList<BerInteger>();
 			}
@@ -806,7 +810,7 @@
 		private static final long serialVersionUID = 1L;
 
 		public static final BerTag tag = new BerTag(BerTag.UNIVERSAL_CLASS, BerTag.CONSTRUCTED, 16);
-		public byte[] code = null;
+		@JsonIgnore public byte[] code = null;
 		private List<BerInteger> seqOf = null;
 
 		public PktLossRateDl() {
@@ -817,7 +821,7 @@
 			this.code = code;
 		}
 
-		public List<BerInteger> getBerInteger() {
+		@JsonValue public List<BerInteger> getBerInteger() {
 			if (seqOf == null) {
 				seqOf = new ArrayList<BerInteger>();
 			}
@@ -935,7 +939,7 @@
 		private static final long serialVersionUID = 1L;
 
 		public static final BerTag tag = new BerTag(BerTag.UNIVERSAL_CLASS, BerTag.CONSTRUCTED, 16);
-		public byte[] code = null;
+		@JsonIgnore public byte[] code = null;
 		private List<BerInteger> seqOf = null;
 
 		public PktLossRateUl() {
@@ -946,7 +950,7 @@
 			this.code = code;
 		}
 
-		public List<BerInteger> getBerInteger() {
+		@JsonValue public List<BerInteger> getBerInteger() {
 			if (seqOf == null) {
 				seqOf = new ArrayList<BerInteger>();
 			}
@@ -1064,7 +1068,7 @@
 		private static final long serialVersionUID = 1L;
 
 		public static final BerTag tag = new BerTag(BerTag.UNIVERSAL_CLASS, BerTag.CONSTRUCTED, 16);
-		public byte[] code = null;
+		@JsonIgnore public byte[] code = null;
 		private List<BerInteger> seqOf = null;
 
 		public ThroughputDl() {
@@ -1075,7 +1079,7 @@
 			this.code = code;
 		}
 
-		public List<BerInteger> getBerInteger() {
+		@JsonValue public List<BerInteger> getBerInteger() {
 			if (seqOf == null) {
 				seqOf = new ArrayList<BerInteger>();
 			}
@@ -1193,7 +1197,7 @@
 		private static final long serialVersionUID = 1L;
 
 		public static final BerTag tag = new BerTag(BerTag.UNIVERSAL_CLASS, BerTag.CONSTRUCTED, 16);
-		public byte[] code = null;
+		@JsonIgnore public byte[] code = null;
 		private List<BerInteger> seqOf = null;
 
 		public ThroughputUl() {
@@ -1204,6 +1208,7 @@
 			this.code = code;
 		}
 
+		@JsonValue
 		public List<BerInteger> getBerInteger() {
 			if (seqOf == null) {
 				seqOf = new ArrayList<BerInteger>();
@@ -1319,7 +1324,7 @@
 
 	public static final BerTag tag = new BerTag(BerTag.UNIVERSAL_CLASS, BerTag.CONSTRUCTED, 16);
 
-	public byte[] code = null;
+	@JsonIgnore public byte[] code = null;
 	private ECGI ecgi = null;
 	private CRNTI crnti = null;
 	private QciVals qciVals = null;
@@ -1674,7 +1679,7 @@
 			sb.append("\t");
 		}
 		if (ecgi != null) {
-			sb.append("\"ecgi\": ");
+			sb.append("ecgi: ");
 			ecgi.appendAsString(sb, indentLevel + 1);
 		}
 		
@@ -1683,7 +1688,7 @@
 			sb.append("\t");
 		}
 		if (crnti != null) {
-			sb.append("\"crnti\": ").append(crnti);
+			sb.append("crnti: ").append(crnti);
 		}
 		
 		sb.append(",\n");
@@ -1691,7 +1696,7 @@
 			sb.append("\t");
 		}
 		if (qciVals != null) {
-			sb.append("\"qciVals\": ");
+			sb.append("qciVals: ");
 			qciVals.appendAsString(sb, indentLevel + 1);
 		}
 		
@@ -1700,7 +1705,7 @@
 			sb.append("\t");
 		}
 		if (dataVolDl != null) {
-			sb.append("\"dataVolDl\": ");
+			sb.append("dataVolDl: ");
 			dataVolDl.appendAsString(sb, indentLevel + 1);
 		}
 		
@@ -1709,7 +1714,7 @@
 			sb.append("\t");
 		}
 		if (dataVolUl != null) {
-			sb.append("\"dataVolUl\": ");
+			sb.append("dataVolUl: ");
 			dataVolUl.appendAsString(sb, indentLevel + 1);
 		}
 		
@@ -1718,7 +1723,7 @@
 			sb.append("\t");
 		}
 		if (pktDelayDl != null) {
-			sb.append("\"pktDelayDl\": ");
+			sb.append("pktDelayDl: ");
 			pktDelayDl.appendAsString(sb, indentLevel + 1);
 		}
 		
@@ -1727,7 +1732,7 @@
 			sb.append("\t");
 		}
 		if (pktDelayUl != null) {
-			sb.append("\"pktDelayUl\": ");
+			sb.append("pktDelayUl: ");
 			pktDelayUl.appendAsString(sb, indentLevel + 1);
 		}
 		
@@ -1736,7 +1741,7 @@
 			sb.append("\t");
 		}
 		if (pktDiscardRateDl != null) {
-			sb.append("\"pktDiscardRateDl\": ");
+			sb.append("pktDiscardRateDl: ");
 			pktDiscardRateDl.appendAsString(sb, indentLevel + 1);
 		}
 		
@@ -1745,7 +1750,7 @@
 			sb.append("\t");
 		}
 		if (pktLossRateDl != null) {
-			sb.append("\"pktLossRateDl\": ");
+			sb.append("pktLossRateDl: ");
 			pktLossRateDl.appendAsString(sb, indentLevel + 1);
 		}
 		
@@ -1754,7 +1759,7 @@
 			sb.append("\t");
 		}
 		if (pktLossRateUl != null) {
-			sb.append("\"pktLossRateUl\": ");
+			sb.append("pktLossRateUl: ");
 			pktLossRateUl.appendAsString(sb, indentLevel + 1);
 		}
 		
@@ -1763,7 +1768,7 @@
 			sb.append("\t");
 		}
 		if (throughputDl != null) {
-			sb.append("\"throughputDl\": ");
+			sb.append("throughputDl: ");
 			throughputDl.appendAsString(sb, indentLevel + 1);
 		}
 		
@@ -1772,7 +1777,7 @@
 			sb.append("\t");
 		}
 		if (throughputUl != null) {
-			sb.append("\"throughputUl\": ");
+			sb.append("throughputUl: ");
 			throughputUl.appendAsString(sb, indentLevel + 1);
 		}
 		
diff --git a/src/main/java/org.onosproject.xran/codecs/pdu/RRMConfig.java b/src/main/java/org.onosproject.xran/codecs/pdu/RRMConfig.java
index 4c9bae7..c2164c3 100644
--- a/src/main/java/org.onosproject.xran/codecs/pdu/RRMConfig.java
+++ b/src/main/java/org.onosproject.xran/codecs/pdu/RRMConfig.java
@@ -4,15 +4,17 @@
 
 package org.onosproject.xran.codecs.pdu;
 
+import com.fasterxml.jackson.annotation.JsonIgnore;
+import com.fasterxml.jackson.annotation.JsonValue;
 import org.onosproject.xran.codecs.api.CRNTI;
 import org.onosproject.xran.codecs.api.ECGI;
 import org.onosproject.xran.codecs.api.XICICPA;
-import org.openmuc.jasn1.ber.BerByteArrayOutputStream;
-import org.openmuc.jasn1.ber.BerLength;
-import org.openmuc.jasn1.ber.BerTag;
-import org.openmuc.jasn1.ber.types.BerBitString;
-import org.openmuc.jasn1.ber.types.BerInteger;
-import org.openmuc.jasn1.ber.types.string.BerUTF8String;
+import org.onosproject.xran.codecs.ber.BerByteArrayOutputStream;
+import org.onosproject.xran.codecs.ber.BerLength;
+import org.onosproject.xran.codecs.ber.BerTag;
+import org.onosproject.xran.codecs.ber.types.BerBitString;
+import org.onosproject.xran.codecs.ber.types.BerInteger;
+import org.onosproject.xran.codecs.ber.types.string.BerUTF8String;
 
 import java.io.IOException;
 import java.io.InputStream;
@@ -26,6 +28,7 @@
 
     public static final BerTag tag = new BerTag(BerTag.UNIVERSAL_CLASS, BerTag.CONSTRUCTED, 16);
     private static final long serialVersionUID = 1L;
+    @JsonIgnore
     public byte[] code = null;
     private ECGI ecgi = null;
     private Crnti crnti = null;
@@ -355,7 +358,7 @@
             sb.append("\t");
         }
         if (ecgi != null) {
-            sb.append("\"ecgi\": ");
+            sb.append("ecgi: ");
             ecgi.appendAsString(sb, indentLevel + 1);
         }
 
@@ -364,7 +367,7 @@
             for (int i = 0; i < indentLevel + 1; i++) {
                 sb.append("\t");
             }
-            sb.append("\"crnti\": ");
+            sb.append("crnti: ");
             crnti.appendAsString(sb, indentLevel + 1);
         }
 
@@ -373,7 +376,7 @@
             for (int i = 0; i < indentLevel + 1; i++) {
                 sb.append("\t");
             }
-            sb.append("\"pa\": ");
+            sb.append("pa: ");
             pa.appendAsString(sb, indentLevel + 1);
         }
 
@@ -382,7 +385,7 @@
             for (int i = 0; i < indentLevel + 1; i++) {
                 sb.append("\t");
             }
-            sb.append("\"startPrbDl\": ");
+            sb.append("startPrbDl: ");
             startPrbDl.appendAsString(sb, indentLevel + 1);
         }
 
@@ -391,7 +394,7 @@
             for (int i = 0; i < indentLevel + 1; i++) {
                 sb.append("\t");
             }
-            sb.append("\"endPrbDl\": ");
+            sb.append("endPrbDl: ");
             endPrbDl.appendAsString(sb, indentLevel + 1);
         }
 
@@ -400,7 +403,7 @@
             for (int i = 0; i < indentLevel + 1; i++) {
                 sb.append("\t");
             }
-            sb.append("\"subframeBitmaskDl\": ");
+            sb.append("subframeBitmaskDl: ");
             subframeBitmaskDl.appendAsString(sb, indentLevel + 1);
         }
 
@@ -409,7 +412,7 @@
             for (int i = 0; i < indentLevel + 1; i++) {
                 sb.append("\t");
             }
-            sb.append("\"p0UePusch\": ");
+            sb.append("p0UePusch: ");
             p0UePusch.appendAsString(sb, indentLevel + 1);
         }
 
@@ -418,7 +421,7 @@
             for (int i = 0; i < indentLevel + 1; i++) {
                 sb.append("\t");
             }
-            sb.append("\"startPrbUl\": ");
+            sb.append("startPrbUl: ");
             startPrbUl.appendAsString(sb, indentLevel + 1);
         }
 
@@ -427,7 +430,7 @@
             for (int i = 0; i < indentLevel + 1; i++) {
                 sb.append("\t");
             }
-            sb.append("\"endPrbUl\": ");
+            sb.append("endPrbUl: ");
             endPrbUl.appendAsString(sb, indentLevel + 1);
         }
 
@@ -436,7 +439,7 @@
             for (int i = 0; i < indentLevel + 1; i++) {
                 sb.append("\t");
             }
-            sb.append("\"subframeBitmaskUl\": ");
+            sb.append("subframeBitmaskUl: ");
             subframeBitmaskUl.appendAsString(sb, indentLevel + 1);
         }
 
@@ -451,7 +454,7 @@
 
         public static final BerTag tag = new BerTag(BerTag.UNIVERSAL_CLASS, BerTag.CONSTRUCTED, 16);
         private static final long serialVersionUID = 1L;
-        public byte[] code = null;
+        @JsonIgnore public byte[] code = null;
         private List<CRNTI> seqOf = null;
 
         public Crnti() {
@@ -462,6 +465,7 @@
             this.code = code;
         }
 
+        @JsonValue
         public List<CRNTI> getCRNTI() {
             if (seqOf == null) {
                 seqOf = new ArrayList<CRNTI>();
@@ -579,7 +583,7 @@
 
         public static final BerTag tag = new BerTag(BerTag.UNIVERSAL_CLASS, BerTag.CONSTRUCTED, 16);
         private static final long serialVersionUID = 1L;
-        public byte[] code = null;
+        @JsonIgnore public byte[] code = null;
         private List<XICICPA> seqOf = null;
 
         public Pa() {
@@ -590,6 +594,7 @@
             this.code = code;
         }
 
+        @JsonValue
         public List<XICICPA> getXICICPA() {
             if (seqOf == null) {
                 seqOf = new ArrayList<XICICPA>();
@@ -703,7 +708,7 @@
 
         public static final BerTag tag = new BerTag(BerTag.UNIVERSAL_CLASS, BerTag.CONSTRUCTED, 16);
         private static final long serialVersionUID = 1L;
-        public byte[] code = null;
+        @JsonIgnore public byte[] code = null;
         private List<BerInteger> seqOf = null;
 
         public StartPrbDl() {
@@ -722,7 +727,7 @@
             this.seqOf = seqOf;
         }
 
-        public List<BerInteger> getBerInteger() {
+        @JsonValue public List<BerInteger> getBerInteger() {
             if (seqOf == null) {
                 seqOf = new ArrayList<BerInteger>();
             }
@@ -838,7 +843,7 @@
 
         public static final BerTag tag = new BerTag(BerTag.UNIVERSAL_CLASS, BerTag.CONSTRUCTED, 16);
         private static final long serialVersionUID = 1L;
-        public byte[] code = null;
+        @JsonIgnore public byte[] code = null;
         private List<BerInteger> seqOf = null;
 
         public EndPrbDl() {
@@ -849,7 +854,7 @@
             this.code = code;
         }
 
-        public List<BerInteger> getBerInteger() {
+        @JsonValue public List<BerInteger> getBerInteger() {
             if (seqOf == null) {
                 seqOf = new ArrayList<BerInteger>();
             }
@@ -973,7 +978,7 @@
 
         public static final BerTag tag = new BerTag(BerTag.UNIVERSAL_CLASS, BerTag.CONSTRUCTED, 16);
         private static final long serialVersionUID = 1L;
-        public byte[] code = null;
+        @JsonIgnore public byte[] code = null;
         private List<BerBitString> seqOf = null;
 
         public SubframeBitmaskDl() {
@@ -984,6 +989,7 @@
             this.code = code;
         }
 
+        @JsonValue
         public List<BerBitString> getBerBitString() {
             if (seqOf == null) {
                 seqOf = new ArrayList<BerBitString>();
@@ -1077,13 +1083,13 @@
             } else {
                 Iterator<BerBitString> it = seqOf.iterator();
                 if (it.hasNext()) {
-                    sb.append("\"" + it.next() + "\"");
+                    sb.append("" + it.next() + "");
                     while (it.hasNext()) {
                         sb.append(",\n");
                         for (int i = 0; i < indentLevel + 1; i++) {
                             sb.append("\t");
                         }
-                        sb.append("\"" + it.next() + "\"");
+                        sb.append("" + it.next() + "");
                     }
                 }
             }
@@ -1101,7 +1107,7 @@
 
         public static final BerTag tag = new BerTag(BerTag.UNIVERSAL_CLASS, BerTag.CONSTRUCTED, 16);
         private static final long serialVersionUID = 1L;
-        public byte[] code = null;
+        @JsonIgnore public byte[] code = null;
         private List<BerInteger> seqOf = null;
 
         public P0UePusch() {
@@ -1112,7 +1118,7 @@
             this.code = code;
         }
 
-        public List<BerInteger> getBerInteger() {
+        @JsonValue public List<BerInteger> getBerInteger() {
             if (seqOf == null) {
                 seqOf = new ArrayList<BerInteger>();
             }
@@ -1225,7 +1231,7 @@
 
         public static final BerTag tag = new BerTag(BerTag.UNIVERSAL_CLASS, BerTag.CONSTRUCTED, 16);
         private static final long serialVersionUID = 1L;
-        public byte[] code = null;
+        @JsonIgnore public byte[] code = null;
         private List<BerInteger> seqOf = null;
 
         public StartPrbUl() {
@@ -1236,7 +1242,7 @@
             this.code = code;
         }
 
-        public List<BerInteger> getBerInteger() {
+        @JsonValue public List<BerInteger> getBerInteger() {
             if (seqOf == null) {
                 seqOf = new ArrayList<BerInteger>();
             }
@@ -1360,7 +1366,7 @@
 
         public static final BerTag tag = new BerTag(BerTag.UNIVERSAL_CLASS, BerTag.CONSTRUCTED, 16);
         private static final long serialVersionUID = 1L;
-        public byte[] code = null;
+        @JsonIgnore public byte[] code = null;
         private List<BerInteger> seqOf = null;
 
         public EndPrbUl() {
@@ -1371,6 +1377,7 @@
             this.code = code;
         }
 
+        @JsonValue
         public List<BerInteger> getBerInteger() {
             if (seqOf == null) {
                 seqOf = new ArrayList<BerInteger>();
@@ -1495,7 +1502,7 @@
 
         public static final BerTag tag = new BerTag(BerTag.UNIVERSAL_CLASS, BerTag.CONSTRUCTED, 16);
         private static final long serialVersionUID = 1L;
-        public byte[] code = null;
+        @JsonIgnore public byte[] code = null;
         private List<BerBitString> seqOf = null;
 
         public SubframeBitmaskUl() {
@@ -1506,6 +1513,7 @@
             this.code = code;
         }
 
+        @JsonValue
         public List<BerBitString> getBerBitString() {
             if (seqOf == null) {
                 seqOf = new ArrayList<BerBitString>();
diff --git a/src/main/java/org.onosproject.xran/codecs/pdu/RRMConfigStatus.java b/src/main/java/org.onosproject.xran/codecs/pdu/RRMConfigStatus.java
index ab88a6d..015e8fe 100644
--- a/src/main/java/org.onosproject.xran/codecs/pdu/RRMConfigStatus.java
+++ b/src/main/java/org.onosproject.xran/codecs/pdu/RRMConfigStatus.java
@@ -4,12 +4,14 @@
 
 package org.onosproject.xran.codecs.pdu;
 
+import com.fasterxml.jackson.annotation.JsonIgnore;
+import com.fasterxml.jackson.annotation.JsonValue;
 import org.onosproject.xran.codecs.api.CRNTI;
 import org.onosproject.xran.codecs.api.ECGI;
-import org.openmuc.jasn1.ber.BerByteArrayOutputStream;
-import org.openmuc.jasn1.ber.BerLength;
-import org.openmuc.jasn1.ber.BerTag;
-import org.openmuc.jasn1.ber.types.BerEnum;
+import org.onosproject.xran.codecs.ber.BerByteArrayOutputStream;
+import org.onosproject.xran.codecs.ber.BerLength;
+import org.onosproject.xran.codecs.ber.BerTag;
+import org.onosproject.xran.codecs.ber.types.BerEnum;
 
 import java.io.IOException;
 import java.io.InputStream;
@@ -28,6 +30,7 @@
 		private static final long serialVersionUID = 1L;
 
 		public static final BerTag tag = new BerTag(BerTag.UNIVERSAL_CLASS, BerTag.CONSTRUCTED, 16);
+		@JsonIgnore
 		public byte[] code = null;
 		private List<CRNTI> seqOf = null;
 
@@ -39,6 +42,7 @@
 			this.code = code;
 		}
 
+		@JsonValue
 		public List<CRNTI> getCRNTI() {
 			if (seqOf == null) {
 				seqOf = new ArrayList<CRNTI>();
@@ -154,7 +158,7 @@
 		private static final long serialVersionUID = 1L;
 
 		public static final BerTag tag = new BerTag(BerTag.UNIVERSAL_CLASS, BerTag.CONSTRUCTED, 16);
-		public byte[] code = null;
+		@JsonIgnore public byte[] code = null;
 		private List<BerEnum> seqOf = null;
 
 		public Status() {
@@ -165,6 +169,7 @@
 			this.code = code;
 		}
 
+		@JsonValue
 		public List<BerEnum> getBerEnum() {
 			if (seqOf == null) {
 				seqOf = new ArrayList<BerEnum>();
@@ -277,7 +282,7 @@
 
 	public static final BerTag tag = new BerTag(BerTag.UNIVERSAL_CLASS, BerTag.CONSTRUCTED, 16);
 
-	public byte[] code = null;
+	@JsonIgnore public byte[] code = null;
 	private ECGI ecgi = null;
 	private Crnti crnti = null;
 	private Status status = null;
@@ -424,7 +429,7 @@
 			sb.append("\t");
 		}
 		if (ecgi != null) {
-			sb.append("\"ecgi\": ");
+			sb.append("ecgi: ");
 			ecgi.appendAsString(sb, indentLevel + 1);
 		}
 		
@@ -433,7 +438,7 @@
 			for (int i = 0; i < indentLevel + 1; i++) {
 				sb.append("\t");
 			}
-			sb.append("\"crnti\": ");
+			sb.append("crnti: ");
 			crnti.appendAsString(sb, indentLevel + 1);
 		}
 		
@@ -442,7 +447,7 @@
 			sb.append("\t");
 		}
 		if (status != null) {
-			sb.append("\"status\": ");
+			sb.append("status: ");
 			status.appendAsString(sb, indentLevel + 1);
 		}
 		
diff --git a/src/main/java/org.onosproject.xran/codecs/pdu/RXSigMeasConfig.java b/src/main/java/org.onosproject.xran/codecs/pdu/RXSigMeasConfig.java
index f8b5403..02b7cf3 100644
--- a/src/main/java/org.onosproject.xran/codecs/pdu/RXSigMeasConfig.java
+++ b/src/main/java/org.onosproject.xran/codecs/pdu/RXSigMeasConfig.java
@@ -4,11 +4,13 @@
 
 package org.onosproject.xran.codecs.pdu;
 
+import com.fasterxml.jackson.annotation.JsonIgnore;
+import com.fasterxml.jackson.annotation.JsonValue;
 import org.onosproject.xran.codecs.api.*;
-import org.openmuc.jasn1.ber.BerByteArrayOutputStream;
-import org.openmuc.jasn1.ber.BerLength;
-import org.openmuc.jasn1.ber.BerTag;
-import org.openmuc.jasn1.ber.types.string.BerUTF8String;
+import org.onosproject.xran.codecs.ber.BerByteArrayOutputStream;
+import org.onosproject.xran.codecs.ber.BerLength;
+import org.onosproject.xran.codecs.ber.BerTag;
+import org.onosproject.xran.codecs.ber.types.string.BerUTF8String;
 
 import java.io.IOException;
 import java.io.InputStream;
@@ -27,7 +29,7 @@
 		private static final long serialVersionUID = 1L;
 
 		public static final BerTag tag = new BerTag(BerTag.UNIVERSAL_CLASS, BerTag.CONSTRUCTED, 16);
-		public byte[] code = null;
+		@JsonIgnore public byte[] code = null;
 		private List<PCIARFCN> seqOf = null;
 
 		public MeasCells() {
@@ -38,6 +40,7 @@
 			this.code = code;
 		}
 
+		@JsonValue
 		public List<PCIARFCN> getPCIARFCN() {
 			if (seqOf == null) {
 				seqOf = new ArrayList<PCIARFCN>();
@@ -153,6 +156,7 @@
 
 	public static final BerTag tag = new BerTag(BerTag.UNIVERSAL_CLASS, BerTag.CONSTRUCTED, 16);
 
+	@JsonIgnore
 	public byte[] code = null;
 	private ECGI ecgi = null;
 	private CRNTI crnti = null;
@@ -347,7 +351,7 @@
 			sb.append("\t");
 		}
 		if (ecgi != null) {
-			sb.append("\"ecgi\": ");
+			sb.append("ecgi: ");
 			ecgi.appendAsString(sb, indentLevel + 1);
 		}
 		
@@ -356,7 +360,7 @@
 			sb.append("\t");
 		}
 		if (crnti != null) {
-			sb.append("\"crnti\": ").append(crnti);
+			sb.append("crnti: ").append(crnti);
 		}
 		
 		sb.append(",\n");
@@ -364,7 +368,7 @@
 			sb.append("\t");
 		}
 		if (reportQty != null) {
-			sb.append("\"reportQty\": ").append(reportQty);
+			sb.append("reportQty: ").append(reportQty);
 		}
 		
 		sb.append(",\n");
@@ -372,7 +376,7 @@
 			sb.append("\t");
 		}
 		if (measCells != null) {
-			sb.append("\"measCells\": ");
+			sb.append("measCells: ");
 			measCells.appendAsString(sb, indentLevel + 1);
 		}
 		
@@ -381,7 +385,7 @@
 			sb.append("\t");
 		}
 		if (reportInterval != null) {
-			sb.append("\"reportInterval\": ").append(reportInterval);
+			sb.append("reportInterval: ").append(reportInterval);
 		}
 		
 		sb.append("\n");
diff --git a/src/main/java/org.onosproject.xran/codecs/pdu/RXSigMeasReport.java b/src/main/java/org.onosproject.xran/codecs/pdu/RXSigMeasReport.java
index bee7bdd..e6d735e 100644
--- a/src/main/java/org.onosproject.xran/codecs/pdu/RXSigMeasReport.java
+++ b/src/main/java/org.onosproject.xran/codecs/pdu/RXSigMeasReport.java
@@ -4,12 +4,14 @@
 
 package org.onosproject.xran.codecs.pdu;
 
+import com.fasterxml.jackson.annotation.JsonIgnore;
+import com.fasterxml.jackson.annotation.JsonValue;
 import org.onosproject.xran.codecs.api.CRNTI;
 import org.onosproject.xran.codecs.api.ECGI;
 import org.onosproject.xran.codecs.api.RXSigReport;
-import org.openmuc.jasn1.ber.BerByteArrayOutputStream;
-import org.openmuc.jasn1.ber.BerLength;
-import org.openmuc.jasn1.ber.BerTag;
+import org.onosproject.xran.codecs.ber.BerByteArrayOutputStream;
+import org.onosproject.xran.codecs.ber.BerLength;
+import org.onosproject.xran.codecs.ber.BerTag;
 
 import java.io.IOException;
 import java.io.InputStream;
@@ -27,6 +29,7 @@
 		private static final long serialVersionUID = 1L;
 
 		public static final BerTag tag = new BerTag(BerTag.UNIVERSAL_CLASS, BerTag.CONSTRUCTED, 16);
+		@JsonIgnore
 		public byte[] code = null;
 		private List<RXSigReport> seqOf = null;
 
@@ -38,6 +41,7 @@
 			this.code = code;
 		}
 
+		@JsonValue
 		public List<RXSigReport> getRXSigReport() {
 			if (seqOf == null) {
 				seqOf = new ArrayList<RXSigReport>();
@@ -153,7 +157,7 @@
 
 	public static final BerTag tag = new BerTag(BerTag.UNIVERSAL_CLASS, BerTag.CONSTRUCTED, 16);
 
-	public byte[] code = null;
+	@JsonIgnore public byte[] code = null;
 	private CRNTI crnti = null;
 	private ECGI ecgi = null;
 	private CellMeasReports cellMeasReports = null;
@@ -301,7 +305,7 @@
 			sb.append("\t");
 		}
 		if (crnti != null) {
-			sb.append("\"crnti\": ").append(crnti);
+			sb.append("crnti: ").append(crnti);
 		}
 		
 		sb.append(",\n");
@@ -309,7 +313,7 @@
 			sb.append("\t");
 		}
 		if (ecgi != null) {
-			sb.append("\"ecgi\": ");
+			sb.append("ecgi: ");
 			ecgi.appendAsString(sb, indentLevel + 1);
 		}
 		
@@ -318,7 +322,7 @@
 			sb.append("\t");
 		}
 		if (cellMeasReports != null) {
-			sb.append("\"cellMeasReports\": ");
+			sb.append("cellMeasReports: ");
 			cellMeasReports.appendAsString(sb, indentLevel + 1);
 		}
 		
diff --git a/src/main/java/org.onosproject.xran/codecs/pdu/RadioMeasReportPerCell.java b/src/main/java/org.onosproject.xran/codecs/pdu/RadioMeasReportPerCell.java
index ac138c6..bb1c59a 100644
--- a/src/main/java/org.onosproject.xran/codecs/pdu/RadioMeasReportPerCell.java
+++ b/src/main/java/org.onosproject.xran/codecs/pdu/RadioMeasReportPerCell.java
@@ -4,11 +4,13 @@
 
 package org.onosproject.xran.codecs.pdu;
 
+import com.fasterxml.jackson.annotation.JsonIgnore;
+import com.fasterxml.jackson.annotation.JsonValue;
 import org.onosproject.xran.codecs.api.ECGI;
-import org.openmuc.jasn1.ber.BerByteArrayOutputStream;
-import org.openmuc.jasn1.ber.BerLength;
-import org.openmuc.jasn1.ber.BerTag;
-import org.openmuc.jasn1.ber.types.BerInteger;
+import org.onosproject.xran.codecs.ber.BerByteArrayOutputStream;
+import org.onosproject.xran.codecs.ber.BerLength;
+import org.onosproject.xran.codecs.ber.BerTag;
+import org.onosproject.xran.codecs.ber.types.BerInteger;
 
 import java.io.IOException;
 import java.io.InputStream;
@@ -27,6 +29,7 @@
 		private static final long serialVersionUID = 1L;
 
 		public static final BerTag tag = new BerTag(BerTag.UNIVERSAL_CLASS, BerTag.CONSTRUCTED, 16);
+		@JsonIgnore
 		public byte[] code = null;
 		private List<BerInteger> seqOf = null;
 
@@ -38,7 +41,7 @@
 			this.code = code;
 		}
 
-		public List<BerInteger> getBerInteger() {
+		@JsonValue public List<BerInteger> getBerInteger() {
 			if (seqOf == null) {
 				seqOf = new ArrayList<BerInteger>();
 			}
@@ -157,7 +160,7 @@
 		private static final long serialVersionUID = 1L;
 
 		public static final BerTag tag = new BerTag(BerTag.UNIVERSAL_CLASS, BerTag.CONSTRUCTED, 16);
-		public byte[] code = null;
+		@JsonIgnore public byte[] code = null;
 		private List<BerInteger> seqOf = null;
 
 		public PucchIntfPowerHist() {
@@ -168,6 +171,7 @@
 			this.code = code;
 		}
 
+		@JsonValue
 		public List<BerInteger> getBerInteger() {
 			if (seqOf == null) {
 				seqOf = new ArrayList<BerInteger>();
@@ -283,7 +287,7 @@
 
 	public static final BerTag tag = new BerTag(BerTag.UNIVERSAL_CLASS, BerTag.CONSTRUCTED, 16);
 
-	public byte[] code = null;
+	@JsonIgnore public byte[] code = null;
 	private ECGI ecgi = null;
 	private PuschIntfPowerHist puschIntfPowerHist = null;
 	private PucchIntfPowerHist pucchIntfPowerHist = null;
@@ -431,7 +435,7 @@
 			sb.append("\t");
 		}
 		if (ecgi != null) {
-			sb.append("\"ecgi\": ");
+			sb.append("ecgi: ");
 			ecgi.appendAsString(sb, indentLevel + 1);
 		}
 		
@@ -440,7 +444,7 @@
 			sb.append("\t");
 		}
 		if (puschIntfPowerHist != null) {
-			sb.append("\"puschIntfPowerHist\": ");
+			sb.append("puschIntfPowerHist: ");
 			puschIntfPowerHist.appendAsString(sb, indentLevel + 1);
 		}
 		
@@ -449,7 +453,7 @@
 			sb.append("\t");
 		}
 		if (pucchIntfPowerHist != null) {
-			sb.append("\"pucchIntfPowerHist\": ");
+			sb.append("pucchIntfPowerHist: ");
 			pucchIntfPowerHist.appendAsString(sb, indentLevel + 1);
 		}
 		
diff --git a/src/main/java/org.onosproject.xran/codecs/pdu/RadioMeasReportPerUE.java b/src/main/java/org.onosproject.xran/codecs/pdu/RadioMeasReportPerUE.java
index 15f1ea9..7b6b17c 100644
--- a/src/main/java/org.onosproject.xran/codecs/pdu/RadioMeasReportPerUE.java
+++ b/src/main/java/org.onosproject.xran/codecs/pdu/RadioMeasReportPerUE.java
@@ -4,12 +4,14 @@
 
 package org.onosproject.xran.codecs.pdu;
 
+import com.fasterxml.jackson.annotation.JsonIgnore;
+import com.fasterxml.jackson.annotation.JsonValue;
 import org.onosproject.xran.codecs.api.CRNTI;
 import org.onosproject.xran.codecs.api.ECGI;
 import org.onosproject.xran.codecs.api.RadioRepPerServCell;
-import org.openmuc.jasn1.ber.BerByteArrayOutputStream;
-import org.openmuc.jasn1.ber.BerLength;
-import org.openmuc.jasn1.ber.BerTag;
+import org.onosproject.xran.codecs.ber.BerByteArrayOutputStream;
+import org.onosproject.xran.codecs.ber.BerLength;
+import org.onosproject.xran.codecs.ber.BerTag;
 
 import java.io.IOException;
 import java.io.InputStream;
@@ -27,6 +29,7 @@
 		private static final long serialVersionUID = 1L;
 
 		public static final BerTag tag = new BerTag(BerTag.UNIVERSAL_CLASS, BerTag.CONSTRUCTED, 16);
+		@JsonIgnore
 		public byte[] code = null;
 		private List<RadioRepPerServCell> seqOf = null;
 
@@ -38,6 +41,7 @@
 			this.code = code;
 		}
 
+		@JsonValue
 		public List<RadioRepPerServCell> getRadioRepPerServCell() {
 			if (seqOf == null) {
 				seqOf = new ArrayList<RadioRepPerServCell>();
@@ -153,7 +157,7 @@
 
 	public static final BerTag tag = new BerTag(BerTag.UNIVERSAL_CLASS, BerTag.CONSTRUCTED, 16);
 
-	public byte[] code = null;
+	@JsonIgnore public byte[] code = null;
 	private ECGI ecgi = null;
 	private CRNTI crnti = null;
 	private RadioReportServCells radioReportServCells = null;
@@ -301,7 +305,7 @@
 			sb.append("\t");
 		}
 		if (ecgi != null) {
-			sb.append("\"ecgi\": ");
+			sb.append("ecgi: ");
 			ecgi.appendAsString(sb, indentLevel + 1);
 		}
 		
@@ -310,7 +314,7 @@
 			sb.append("\t");
 		}
 		if (crnti != null) {
-			sb.append("\"crnti\": ").append(crnti);
+			sb.append("crnti: ").append(crnti);
 		}
 		
 		sb.append(",\n");
@@ -318,7 +322,7 @@
 			sb.append("\t");
 		}
 		if (radioReportServCells != null) {
-			sb.append("\"radioReportServCells\": ");
+			sb.append("radioReportServCells: ");
 			radioReportServCells.appendAsString(sb, indentLevel + 1);
 		}
 		
diff --git a/src/main/java/org.onosproject.xran/codecs/pdu/ScellAdd.java b/src/main/java/org.onosproject.xran/codecs/pdu/ScellAdd.java
index 3ee1f02..674b79d 100644
--- a/src/main/java/org.onosproject.xran/codecs/pdu/ScellAdd.java
+++ b/src/main/java/org.onosproject.xran/codecs/pdu/ScellAdd.java
@@ -4,16 +4,18 @@
 
 package org.onosproject.xran.codecs.pdu;
 
+import com.fasterxml.jackson.annotation.JsonIgnore;
+import com.fasterxml.jackson.annotation.JsonValue;
 import org.onosproject.xran.codecs.api.CRNTI;
 import org.onosproject.xran.codecs.api.ECGI;
 import org.onosproject.xran.codecs.api.PropScell;
-import org.openmuc.jasn1.ber.BerByteArrayOutputStream;
-import org.openmuc.jasn1.ber.BerLength;
-import org.openmuc.jasn1.ber.BerTag;
-import org.openmuc.jasn1.ber.types.BerBoolean;
-import org.openmuc.jasn1.ber.types.BerEnum;
-import org.openmuc.jasn1.ber.types.BerInteger;
-import org.openmuc.jasn1.ber.types.string.BerUTF8String;
+import org.onosproject.xran.codecs.ber.BerByteArrayOutputStream;
+import org.onosproject.xran.codecs.ber.BerLength;
+import org.onosproject.xran.codecs.ber.BerTag;
+import org.onosproject.xran.codecs.ber.types.BerBoolean;
+import org.onosproject.xran.codecs.ber.types.BerEnum;
+import org.onosproject.xran.codecs.ber.types.BerInteger;
+import org.onosproject.xran.codecs.ber.types.string.BerUTF8String;
 
 import java.io.IOException;
 import java.io.InputStream;
@@ -28,6 +30,7 @@
 
     public static final BerTag tag = new BerTag(BerTag.UNIVERSAL_CLASS, BerTag.CONSTRUCTED, 16);
     private static final long serialVersionUID = 1L;
+    @JsonIgnore
     public byte[] code = null;
     private CRNTI crnti = null;
     private ECGI ecgi = null;
@@ -205,7 +208,7 @@
             sb.append("\t");
         }
         if (crnti != null) {
-            sb.append("\"crnti\": ").append(crnti);
+            sb.append("crnti: ").append(crnti);
         }
 
         sb.append(",\n");
@@ -213,7 +216,7 @@
             sb.append("\t");
         }
         if (ecgi != null) {
-            sb.append("\"ecgi\": ");
+            sb.append("ecgi: ");
             ecgi.appendAsString(sb, indentLevel + 1);
         }
 
@@ -222,7 +225,7 @@
             sb.append("\t");
         }
         if (scellsProp != null) {
-            sb.append("\"scellsProp\": ");
+            sb.append("scellsProp: ");
             scellsProp.appendAsString(sb, indentLevel + 1);
         }
 
@@ -237,7 +240,7 @@
 
         public static final BerTag tag = new BerTag(BerTag.UNIVERSAL_CLASS, BerTag.CONSTRUCTED, 16);
         private static final long serialVersionUID = 1L;
-        public byte[] code = null;
+        @JsonIgnore public byte[] code = null;
         private List<PropScell> seqOf = null;
 
         public ScellsProp() {
@@ -248,6 +251,7 @@
             this.code = code;
         }
 
+        @JsonValue
         public List<PropScell> getPropScell() {
             if (seqOf == null) {
                 seqOf = new ArrayList<PropScell>();
diff --git a/src/main/java/org.onosproject.xran/codecs/pdu/ScellAddStatus.java b/src/main/java/org.onosproject.xran/codecs/pdu/ScellAddStatus.java
index 99ddadd..1efc52f 100644
--- a/src/main/java/org.onosproject.xran/codecs/pdu/ScellAddStatus.java
+++ b/src/main/java/org.onosproject.xran/codecs/pdu/ScellAddStatus.java
@@ -4,13 +4,15 @@
 
 package org.onosproject.xran.codecs.pdu;
 
+import com.fasterxml.jackson.annotation.JsonIgnore;
+import com.fasterxml.jackson.annotation.JsonValue;
 import org.onosproject.xran.codecs.api.CRNTI;
 import org.onosproject.xran.codecs.api.ECGI;
 import org.onosproject.xran.codecs.api.PCIARFCN;
-import org.openmuc.jasn1.ber.BerByteArrayOutputStream;
-import org.openmuc.jasn1.ber.BerLength;
-import org.openmuc.jasn1.ber.BerTag;
-import org.openmuc.jasn1.ber.types.BerEnum;
+import org.onosproject.xran.codecs.ber.BerByteArrayOutputStream;
+import org.onosproject.xran.codecs.ber.BerLength;
+import org.onosproject.xran.codecs.ber.BerTag;
+import org.onosproject.xran.codecs.ber.types.BerEnum;
 
 import java.io.IOException;
 import java.io.InputStream;
@@ -28,6 +30,7 @@
 		private static final long serialVersionUID = 1L;
 
 		public static final BerTag tag = new BerTag(BerTag.UNIVERSAL_CLASS, BerTag.CONSTRUCTED, 16);
+		@JsonIgnore
 		public byte[] code = null;
 		private List<PCIARFCN> seqOf = null;
 
@@ -39,6 +42,7 @@
 			this.code = code;
 		}
 
+		@JsonValue
 		public List<PCIARFCN> getPCIARFCN() {
 			if (seqOf == null) {
 				seqOf = new ArrayList<PCIARFCN>();
@@ -154,7 +158,7 @@
 		private static final long serialVersionUID = 1L;
 
 		public static final BerTag tag = new BerTag(BerTag.UNIVERSAL_CLASS, BerTag.CONSTRUCTED, 16);
-		public byte[] code = null;
+		@JsonIgnore public byte[] code = null;
 		private List<BerEnum> seqOf = null;
 
 		public Status() {
@@ -165,6 +169,7 @@
 			this.code = code;
 		}
 
+		@JsonValue
 		public List<BerEnum> getBerEnum() {
 			if (seqOf == null) {
 				seqOf = new ArrayList<BerEnum>();
@@ -277,7 +282,7 @@
 
 	public static final BerTag tag = new BerTag(BerTag.UNIVERSAL_CLASS, BerTag.CONSTRUCTED, 16);
 
-	public byte[] code = null;
+	@JsonIgnore public byte[] code = null;
 	private CRNTI crnti = null;
 	private ECGI ecgi = null;
 	private ScellsInd scellsInd = null;
@@ -448,7 +453,7 @@
 			sb.append("\t");
 		}
 		if (crnti != null) {
-			sb.append("\"crnti\": ").append(crnti);
+			sb.append("crnti: ").append(crnti);
 		}
 		
 		sb.append(",\n");
@@ -456,7 +461,7 @@
 			sb.append("\t");
 		}
 		if (ecgi != null) {
-			sb.append("\"ecgi\": ");
+			sb.append("ecgi: ");
 			ecgi.appendAsString(sb, indentLevel + 1);
 		}
 		
@@ -465,7 +470,7 @@
 			sb.append("\t");
 		}
 		if (scellsInd != null) {
-			sb.append("\"scellsInd\": ");
+			sb.append("scellsInd: ");
 			scellsInd.appendAsString(sb, indentLevel + 1);
 		}
 		
@@ -474,7 +479,7 @@
 			sb.append("\t");
 		}
 		if (status != null) {
-			sb.append("\"status\": ");
+			sb.append("status: ");
 			status.appendAsString(sb, indentLevel + 1);
 		}
 
diff --git a/src/main/java/org.onosproject.xran/codecs/pdu/ScellDelete.java b/src/main/java/org.onosproject.xran/codecs/pdu/ScellDelete.java
index 02dd7d2..6080f69 100644
--- a/src/main/java/org.onosproject.xran/codecs/pdu/ScellDelete.java
+++ b/src/main/java/org.onosproject.xran/codecs/pdu/ScellDelete.java
@@ -4,13 +4,15 @@
 
 package org.onosproject.xran.codecs.pdu;
 
+import com.fasterxml.jackson.annotation.JsonIgnore;
+import com.fasterxml.jackson.annotation.JsonValue;
 import org.onosproject.xran.codecs.api.CRNTI;
 import org.onosproject.xran.codecs.api.ECGI;
 import org.onosproject.xran.codecs.api.PCIARFCN;
-import org.openmuc.jasn1.ber.BerByteArrayOutputStream;
-import org.openmuc.jasn1.ber.BerLength;
-import org.openmuc.jasn1.ber.BerTag;
-import org.openmuc.jasn1.ber.types.string.BerUTF8String;
+import org.onosproject.xran.codecs.ber.BerByteArrayOutputStream;
+import org.onosproject.xran.codecs.ber.BerLength;
+import org.onosproject.xran.codecs.ber.BerTag;
+import org.onosproject.xran.codecs.ber.types.string.BerUTF8String;
 
 import java.io.IOException;
 import java.io.InputStream;
@@ -24,6 +26,7 @@
 
     public static final BerTag tag = new BerTag(BerTag.UNIVERSAL_CLASS, BerTag.CONSTRUCTED, 16);
     private static final long serialVersionUID = 1L;
+    @JsonIgnore
     public byte[] code = null;
     private CRNTI crnti = null;
     private ECGI ecgi = null;
@@ -199,7 +202,7 @@
             sb.append("\t");
         }
         if (crnti != null) {
-            sb.append("\"crnti\": ").append(crnti);
+            sb.append("crnti: ").append(crnti);
         }
 
         sb.append(",\n");
@@ -207,7 +210,7 @@
             sb.append("\t");
         }
         if (ecgi != null) {
-            sb.append("\"ecgi\": ");
+            sb.append("ecgi: ");
             ecgi.appendAsString(sb, indentLevel + 1);
         }
 
@@ -216,7 +219,7 @@
             sb.append("\t");
         }
         if (scellsInd != null) {
-            sb.append("\"scellsInd\": ");
+            sb.append("scellsInd: ");
             scellsInd.appendAsString(sb, indentLevel + 1);
         }
 
@@ -231,7 +234,7 @@
 
         public static final BerTag tag = new BerTag(BerTag.UNIVERSAL_CLASS, BerTag.CONSTRUCTED, 16);
         private static final long serialVersionUID = 1L;
-        public byte[] code = null;
+        @JsonIgnore public byte[] code = null;
         private List<PCIARFCN> seqOf = null;
 
         public ScellsInd() {
@@ -242,6 +245,7 @@
             this.code = code;
         }
 
+        @JsonValue
         public List<PCIARFCN> getPCIARFCN() {
             if (seqOf == null) {
                 seqOf = new ArrayList<PCIARFCN>();
diff --git a/src/main/java/org.onosproject.xran/codecs/pdu/SchedMeasReportPerCell.java b/src/main/java/org.onosproject.xran/codecs/pdu/SchedMeasReportPerCell.java
index 1493c63..80821b8 100644
--- a/src/main/java/org.onosproject.xran/codecs/pdu/SchedMeasReportPerCell.java
+++ b/src/main/java/org.onosproject.xran/codecs/pdu/SchedMeasReportPerCell.java
@@ -2,12 +2,14 @@
  * This class file was automatically generated by jASN1 v1.8.0 (http://www.openmuc.org)
  */
 package org.onosproject.xran.codecs.pdu;
+import com.fasterxml.jackson.annotation.JsonIgnore;
+import com.fasterxml.jackson.annotation.JsonValue;
 import org.onosproject.xran.codecs.api.ECGI;
 import org.onosproject.xran.codecs.api.PRBUsage;
 import org.onosproject.xran.codecs.api.QCI;
-import org.openmuc.jasn1.ber.BerByteArrayOutputStream;
-import org.openmuc.jasn1.ber.BerLength;
-import org.openmuc.jasn1.ber.BerTag;
+import org.onosproject.xran.codecs.ber.BerByteArrayOutputStream;
+import org.onosproject.xran.codecs.ber.BerLength;
+import org.onosproject.xran.codecs.ber.BerTag;
 
 import java.io.IOException;
 import java.io.InputStream;
@@ -26,6 +28,7 @@
 		private static final long serialVersionUID = 1L;
 
 		public static final BerTag tag = new BerTag(BerTag.UNIVERSAL_CLASS, BerTag.CONSTRUCTED, 16);
+		@JsonIgnore
 		public byte[] code = null;
 		private List<QCI> seqOf = null;
 
@@ -37,6 +40,7 @@
 			this.code = code;
 		}
 
+		@JsonValue
 		public List<QCI> getQCI() {
 			if (seqOf == null) {
 				seqOf = new ArrayList<QCI>();
@@ -152,7 +156,7 @@
 
 	public static final BerTag tag = new BerTag(BerTag.UNIVERSAL_CLASS, BerTag.CONSTRUCTED, 16);
 
-	public byte[] code = null;
+	@JsonIgnore public byte[] code = null;
 	private ECGI ecgi = null;
 	private QciVals qciVals = null;
 	private PRBUsage prbUsagePcell = null;
@@ -323,7 +327,7 @@
 			sb.append("\t");
 		}
 		if (ecgi != null) {
-			sb.append("\"ecgi\": ");
+			sb.append("ecgi: ");
 			ecgi.appendAsString(sb, indentLevel + 1);
 		}
 		
@@ -332,7 +336,7 @@
 			sb.append("\t");
 		}
 		if (qciVals != null) {
-			sb.append("\"qciVals\": ");
+			sb.append("qciVals: ");
 			qciVals.appendAsString(sb, indentLevel + 1);
 		}
 		
@@ -341,7 +345,7 @@
 			sb.append("\t");
 		}
 		if (prbUsagePcell != null) {
-			sb.append("\"prbUsagePcell\": ");
+			sb.append("prbUsagePcell: ");
 			prbUsagePcell.appendAsString(sb, indentLevel + 1);
 		}
 		
@@ -350,7 +354,7 @@
 			sb.append("\t");
 		}
 		if (prbUsageScell != null) {
-			sb.append("\"prbUsageScell\": ");
+			sb.append("prbUsageScell: ");
 			prbUsageScell.appendAsString(sb, indentLevel + 1);
 		}
 		
diff --git a/src/main/java/org.onosproject.xran/codecs/pdu/SchedMeasReportPerUE.java b/src/main/java/org.onosproject.xran/codecs/pdu/SchedMeasReportPerUE.java
index 3205e88..61616f4 100644
--- a/src/main/java/org.onosproject.xran/codecs/pdu/SchedMeasReportPerUE.java
+++ b/src/main/java/org.onosproject.xran/codecs/pdu/SchedMeasReportPerUE.java
@@ -3,12 +3,14 @@
  */
 package org.onosproject.xran.codecs.pdu;
 
+import com.fasterxml.jackson.annotation.JsonIgnore;
+import com.fasterxml.jackson.annotation.JsonValue;
 import org.onosproject.xran.codecs.api.CRNTI;
 import org.onosproject.xran.codecs.api.ECGI;
 import org.onosproject.xran.codecs.api.SchedMeasRepPerServCell;
-import org.openmuc.jasn1.ber.BerByteArrayOutputStream;
-import org.openmuc.jasn1.ber.BerLength;
-import org.openmuc.jasn1.ber.BerTag;
+import org.onosproject.xran.codecs.ber.BerByteArrayOutputStream;
+import org.onosproject.xran.codecs.ber.BerLength;
+import org.onosproject.xran.codecs.ber.BerTag;
 
 import java.io.IOException;
 import java.io.InputStream;
@@ -26,6 +28,7 @@
 		private static final long serialVersionUID = 1L;
 
 		public static final BerTag tag = new BerTag(BerTag.UNIVERSAL_CLASS, BerTag.CONSTRUCTED, 16);
+		@JsonIgnore
 		public byte[] code = null;
 		private List<SchedMeasRepPerServCell> seqOf = null;
 
@@ -37,6 +40,7 @@
 			this.code = code;
 		}
 
+		@JsonValue
 		public List<SchedMeasRepPerServCell> getSchedMeasRepPerServCell() {
 			if (seqOf == null) {
 				seqOf = new ArrayList<SchedMeasRepPerServCell>();
@@ -152,7 +156,7 @@
 
 	public static final BerTag tag = new BerTag(BerTag.UNIVERSAL_CLASS, BerTag.CONSTRUCTED, 16);
 
-	public byte[] code = null;
+	@JsonIgnore public byte[] code = null;
 	private ECGI ecgi = null;
 	private CRNTI crnti = null;
 	private SchedReportServCells schedReportServCells = null;
@@ -300,7 +304,7 @@
 			sb.append("\t");
 		}
 		if (ecgi != null) {
-			sb.append("\"ecgi\": ");
+			sb.append("ecgi: ");
 			ecgi.appendAsString(sb, indentLevel + 1);
 		}
 		
@@ -309,7 +313,7 @@
 			sb.append("\t");
 		}
 		if (crnti != null) {
-			sb.append("\"crnti\": ").append(crnti);
+			sb.append("crnti: ").append(crnti);
 		}
 		
 		sb.append(",\n");
@@ -317,7 +321,7 @@
 			sb.append("\t");
 		}
 		if (schedReportServCells != null) {
-			sb.append("\"schedReportServCells\": ");
+			sb.append("schedReportServCells: ");
 			schedReportServCells.appendAsString(sb, indentLevel + 1);
 		}
 		
diff --git a/src/main/java/org.onosproject.xran/codecs/pdu/SeNBAdd.java b/src/main/java/org.onosproject.xran/codecs/pdu/SeNBAdd.java
index d86cf6d..5f1d1fa 100644
--- a/src/main/java/org.onosproject.xran/codecs/pdu/SeNBAdd.java
+++ b/src/main/java/org.onosproject.xran/codecs/pdu/SeNBAdd.java
@@ -3,11 +3,12 @@
  */
 package org.onosproject.xran.codecs.pdu;
 
+import com.fasterxml.jackson.annotation.JsonIgnore;
 import org.onosproject.xran.codecs.api.CRNTI;
 import org.onosproject.xran.codecs.api.ECGI;
-import org.openmuc.jasn1.ber.BerByteArrayOutputStream;
-import org.openmuc.jasn1.ber.BerLength;
-import org.openmuc.jasn1.ber.BerTag;
+import org.onosproject.xran.codecs.ber.BerByteArrayOutputStream;
+import org.onosproject.xran.codecs.ber.BerLength;
+import org.onosproject.xran.codecs.ber.BerTag;
 import java.io.IOException;
 import java.io.InputStream;
 import java.io.Serializable;
@@ -19,6 +20,7 @@
 
 	public static final BerTag tag = new BerTag(BerTag.UNIVERSAL_CLASS, BerTag.CONSTRUCTED, 16);
 
+	@JsonIgnore
 	public byte[] code = null;
 	private CRNTI crnti = null;
 	private ECGI mEcgi = null;
@@ -167,7 +169,7 @@
 			sb.append("\t");
 		}
 		if (crnti != null) {
-			sb.append("\"crnti\": ").append(crnti);
+			sb.append("crnti: ").append(crnti);
 		}
 		
 		sb.append(",\n");
@@ -175,7 +177,7 @@
 			sb.append("\t");
 		}
 		if (mEcgi != null) {
-			sb.append("\"mEcgi\": ");
+			sb.append("mEcgi: ");
 			mEcgi.appendAsString(sb, indentLevel + 1);
 		}
 		
@@ -184,7 +186,7 @@
 			sb.append("\t");
 		}
 		if (sEcgi != null) {
-			sb.append("\"sEcgi\": ");
+			sb.append("sEcgi: ");
 			sEcgi.appendAsString(sb, indentLevel + 1);
 		}
 		
diff --git a/src/main/java/org.onosproject.xran/codecs/pdu/SeNBAddStatus.java b/src/main/java/org.onosproject.xran/codecs/pdu/SeNBAddStatus.java
index e09c110..1548c9f 100644
--- a/src/main/java/org.onosproject.xran/codecs/pdu/SeNBAddStatus.java
+++ b/src/main/java/org.onosproject.xran/codecs/pdu/SeNBAddStatus.java
@@ -3,12 +3,13 @@
  */
 package org.onosproject.xran.codecs.pdu;
 
+import com.fasterxml.jackson.annotation.JsonIgnore;
 import org.onosproject.xran.codecs.api.CRNTI;
 import org.onosproject.xran.codecs.api.ECGI;
-import org.openmuc.jasn1.ber.BerByteArrayOutputStream;
-import org.openmuc.jasn1.ber.BerLength;
-import org.openmuc.jasn1.ber.BerTag;
-import org.openmuc.jasn1.ber.types.BerEnum;
+import org.onosproject.xran.codecs.ber.BerByteArrayOutputStream;
+import org.onosproject.xran.codecs.ber.BerLength;
+import org.onosproject.xran.codecs.ber.BerTag;
+import org.onosproject.xran.codecs.ber.types.BerEnum;
 
 import java.io.IOException;
 import java.io.InputStream;
@@ -21,6 +22,7 @@
 
 	public static final BerTag tag = new BerTag(BerTag.UNIVERSAL_CLASS, BerTag.CONSTRUCTED, 16);
 
+	@JsonIgnore
 	public byte[] code = null;
 	private CRNTI crnti = null;
 	private ECGI ecgi = null;
@@ -169,7 +171,7 @@
 			sb.append("\t");
 		}
 		if (crnti != null) {
-			sb.append("\"crnti\": ").append(crnti);
+			sb.append("crnti: ").append(crnti);
 		}
 		
 		sb.append(",\n");
@@ -177,7 +179,7 @@
 			sb.append("\t");
 		}
 		if (ecgi != null) {
-			sb.append("\"ecgi\": ");
+			sb.append("ecgi: ");
 			ecgi.appendAsString(sb, indentLevel + 1);
 		}
 		
@@ -186,7 +188,7 @@
 			sb.append("\t");
 		}
 		if (status != null) {
-			sb.append("\"status\": ").append(status);
+			sb.append("status: ").append(status);
 		}
 		
 		sb.append("\n");
diff --git a/src/main/java/org.onosproject.xran/codecs/pdu/SeNBDelete.java b/src/main/java/org.onosproject.xran/codecs/pdu/SeNBDelete.java
index 8441c3f..14b9dc5 100644
--- a/src/main/java/org.onosproject.xran/codecs/pdu/SeNBDelete.java
+++ b/src/main/java/org.onosproject.xran/codecs/pdu/SeNBDelete.java
@@ -3,11 +3,12 @@
  */
 package org.onosproject.xran.codecs.pdu;
 
+import com.fasterxml.jackson.annotation.JsonIgnore;
 import org.onosproject.xran.codecs.api.CRNTI;
 import org.onosproject.xran.codecs.api.ECGI;
-import org.openmuc.jasn1.ber.BerByteArrayOutputStream;
-import org.openmuc.jasn1.ber.BerLength;
-import org.openmuc.jasn1.ber.BerTag;
+import org.onosproject.xran.codecs.ber.BerByteArrayOutputStream;
+import org.onosproject.xran.codecs.ber.BerLength;
+import org.onosproject.xran.codecs.ber.BerTag;
 
 import java.io.IOException;
 import java.io.InputStream;
@@ -20,6 +21,7 @@
 
 	public static final BerTag tag = new BerTag(BerTag.UNIVERSAL_CLASS, BerTag.CONSTRUCTED, 16);
 
+	@JsonIgnore
 	public byte[] code = null;
 	private CRNTI crnti = null;
 	private ECGI mEcgi = null;
@@ -168,7 +170,7 @@
 			sb.append("\t");
 		}
 		if (crnti != null) {
-			sb.append("\"crnti\": ").append(crnti);
+			sb.append("crnti: ").append(crnti);
 		}
 		
 		sb.append(",\n");
@@ -176,7 +178,7 @@
 			sb.append("\t");
 		}
 		if (mEcgi != null) {
-			sb.append("\"mEcgi\": ");
+			sb.append("mEcgi: ");
 			mEcgi.appendAsString(sb, indentLevel + 1);
 		}
 		
@@ -185,7 +187,7 @@
 			sb.append("\t");
 		}
 		if (sEcgi != null) {
-			sb.append("\"sEcgi\": ");
+			sb.append("sEcgi: ");
 			sEcgi.appendAsString(sb, indentLevel + 1);
 		}
 		
diff --git a/src/main/java/org.onosproject.xran/codecs/pdu/TrafficSplitConfig.java b/src/main/java/org.onosproject.xran/codecs/pdu/TrafficSplitConfig.java
index 408b722..cd68d7f 100644
--- a/src/main/java/org.onosproject.xran/codecs/pdu/TrafficSplitConfig.java
+++ b/src/main/java/org.onosproject.xran/codecs/pdu/TrafficSplitConfig.java
@@ -3,12 +3,14 @@
  */
 package org.onosproject.xran.codecs.pdu;
 
+import com.fasterxml.jackson.annotation.JsonIgnore;
+import com.fasterxml.jackson.annotation.JsonValue;
 import org.onosproject.xran.codecs.api.CRNTI;
 import org.onosproject.xran.codecs.api.ECGI;
 import org.onosproject.xran.codecs.api.TrafficSplitPercentage;
-import org.openmuc.jasn1.ber.BerByteArrayOutputStream;
-import org.openmuc.jasn1.ber.BerLength;
-import org.openmuc.jasn1.ber.BerTag;
+import org.onosproject.xran.codecs.ber.BerByteArrayOutputStream;
+import org.onosproject.xran.codecs.ber.BerLength;
+import org.onosproject.xran.codecs.ber.BerTag;
 
 import java.io.IOException;
 import java.io.InputStream;
@@ -26,6 +28,7 @@
 		private static final long serialVersionUID = 1L;
 
 		public static final BerTag tag = new BerTag(BerTag.UNIVERSAL_CLASS, BerTag.CONSTRUCTED, 16);
+		@JsonIgnore
 		public byte[] code = null;
 		private List<TrafficSplitPercentage> seqOf = null;
 
@@ -37,6 +40,7 @@
 			this.code = code;
 		}
 
+		@JsonValue
 		public List<TrafficSplitPercentage> getTrafficSplitPercentage() {
 			if (seqOf == null) {
 				seqOf = new ArrayList<TrafficSplitPercentage>();
@@ -149,7 +153,7 @@
 
 	public static final BerTag tag = new BerTag(BerTag.UNIVERSAL_CLASS, BerTag.CONSTRUCTED, 16);
 
-	public byte[] code = null;
+	@JsonIgnore public byte[] code = null;
 	private CRNTI crnti = null;
 	private ECGI ecgi = null;
 	private TrafficSplitPercent trafficSplitPercent = null;
@@ -297,7 +301,7 @@
 			sb.append("\t");
 		}
 		if (crnti != null) {
-			sb.append("\"crnti\": ").append(crnti);
+			sb.append("crnti: ").append(crnti);
 		}
 		
 		sb.append(",\n");
@@ -305,7 +309,7 @@
 			sb.append("\t");
 		}
 		if (ecgi != null) {
-			sb.append("\"ecgi\": ");
+			sb.append("ecgi: ");
 			ecgi.appendAsString(sb, indentLevel + 1);
 		}
 		
@@ -314,7 +318,7 @@
 			sb.append("\t");
 		}
 		if (trafficSplitPercent != null) {
-			sb.append("\"trafficSplitPercent\": ");
+			sb.append("trafficSplitPercent: ");
 			trafficSplitPercent.appendAsString(sb, indentLevel + 1);
 		}
 		
diff --git a/src/main/java/org.onosproject.xran/codecs/pdu/UEAdmissionRequest.java b/src/main/java/org.onosproject.xran/codecs/pdu/UEAdmissionRequest.java
index 3eb4b9e..fd5148e 100644
--- a/src/main/java/org.onosproject.xran/codecs/pdu/UEAdmissionRequest.java
+++ b/src/main/java/org.onosproject.xran/codecs/pdu/UEAdmissionRequest.java
@@ -4,9 +4,10 @@
 
 package org.onosproject.xran.codecs.pdu;
 
-import org.openmuc.jasn1.ber.BerByteArrayOutputStream;
-import org.openmuc.jasn1.ber.BerLength;
-import org.openmuc.jasn1.ber.BerTag;
+import com.fasterxml.jackson.annotation.JsonIgnore;
+import org.onosproject.xran.codecs.ber.BerByteArrayOutputStream;
+import org.onosproject.xran.codecs.ber.BerLength;
+import org.onosproject.xran.codecs.ber.BerTag;
 import org.onosproject.xran.codecs.api.AdmEstCause;
 import org.onosproject.xran.codecs.api.CRNTI;
 import org.onosproject.xran.codecs.api.ECGI;
@@ -21,6 +22,7 @@
 
 	public static final BerTag tag = new BerTag(BerTag.UNIVERSAL_CLASS, BerTag.CONSTRUCTED, 16);
 
+	@JsonIgnore
 	public byte[] code = null;
 	private CRNTI crnti = null;
 	private ECGI ecgi = null;
@@ -169,7 +171,7 @@
 			sb.append("\t");
 		}
 		if (crnti != null) {
-			sb.append("\"crnti\": ").append(crnti);
+			sb.append("crnti: ").append(crnti);
 		}
 		
 		sb.append(",\n");
@@ -177,7 +179,7 @@
 			sb.append("\t");
 		}
 		if (ecgi != null) {
-			sb.append("\"ecgi\": ");
+			sb.append("ecgi: ");
 			ecgi.appendAsString(sb, indentLevel + 1);
 		}
 		
@@ -186,7 +188,7 @@
 			sb.append("\t");
 		}
 		if (admEstCause != null) {
-			sb.append("\"admEstCause\": ").append(admEstCause);
+			sb.append("admEstCause: ").append(admEstCause);
 		}
 		
 		sb.append("\n");
diff --git a/src/main/java/org.onosproject.xran/codecs/pdu/UEAdmissionResponse.java b/src/main/java/org.onosproject.xran/codecs/pdu/UEAdmissionResponse.java
index 5d323b7..8600ba3 100644
--- a/src/main/java/org.onosproject.xran/codecs/pdu/UEAdmissionResponse.java
+++ b/src/main/java/org.onosproject.xran/codecs/pdu/UEAdmissionResponse.java
@@ -4,13 +4,14 @@
 
 package org.onosproject.xran.codecs.pdu;
 
-import org.openmuc.jasn1.ber.BerByteArrayOutputStream;
-import org.openmuc.jasn1.ber.BerLength;
-import org.openmuc.jasn1.ber.BerTag;
+import com.fasterxml.jackson.annotation.JsonIgnore;
+import org.onosproject.xran.codecs.ber.BerByteArrayOutputStream;
+import org.onosproject.xran.codecs.ber.BerLength;
+import org.onosproject.xran.codecs.ber.BerTag;
 import org.onosproject.xran.codecs.api.AdmEstResponse;
 import org.onosproject.xran.codecs.api.CRNTI;
 import org.onosproject.xran.codecs.api.ECGI;
-import org.openmuc.jasn1.ber.types.string.BerUTF8String;
+import org.onosproject.xran.codecs.ber.types.string.BerUTF8String;
 
 import java.io.IOException;
 import java.io.InputStream;
@@ -23,6 +24,7 @@
 
 	public static final BerTag tag = new BerTag(BerTag.UNIVERSAL_CLASS, BerTag.CONSTRUCTED, 16);
 
+	@JsonIgnore
 	public byte[] code = null;
 	private CRNTI crnti = null;
 	private ECGI ecgi = null;
@@ -171,7 +173,7 @@
 			sb.append("\t");
 		}
 		if (crnti != null) {
-			sb.append("\"crnti\": ").append(crnti);
+			sb.append("crnti: ").append(crnti);
 		}
 		
 		sb.append(",\n");
@@ -179,7 +181,7 @@
 			sb.append("\t");
 		}
 		if (ecgi != null) {
-			sb.append("\"ecgi\": ");
+			sb.append("ecgi: ");
 			ecgi.appendAsString(sb, indentLevel + 1);
 		}
 		
@@ -188,7 +190,7 @@
 			sb.append("\t");
 		}
 		if (admEstResponse != null) {
-			sb.append("\"admEstResponse\": ").append(admEstResponse);
+			sb.append("admEstResponse: ").append(admEstResponse);
 		}
 		
 		sb.append("\n");
diff --git a/src/main/java/org.onosproject.xran/codecs/pdu/UEAdmissionStatus.java b/src/main/java/org.onosproject.xran/codecs/pdu/UEAdmissionStatus.java
index edfd056..5a06a8a 100644
--- a/src/main/java/org.onosproject.xran/codecs/pdu/UEAdmissionStatus.java
+++ b/src/main/java/org.onosproject.xran/codecs/pdu/UEAdmissionStatus.java
@@ -4,9 +4,10 @@
 
 package org.onosproject.xran.codecs.pdu;
 
-import org.openmuc.jasn1.ber.BerByteArrayOutputStream;
-import org.openmuc.jasn1.ber.BerLength;
-import org.openmuc.jasn1.ber.BerTag;
+import com.fasterxml.jackson.annotation.JsonIgnore;
+import org.onosproject.xran.codecs.ber.BerByteArrayOutputStream;
+import org.onosproject.xran.codecs.ber.BerLength;
+import org.onosproject.xran.codecs.ber.BerTag;
 import org.onosproject.xran.codecs.api.AdmEstStatus;
 import org.onosproject.xran.codecs.api.CRNTI;
 import org.onosproject.xran.codecs.api.ECGI;
@@ -21,6 +22,7 @@
 
 	public static final BerTag tag = new BerTag(BerTag.UNIVERSAL_CLASS, BerTag.CONSTRUCTED, 16);
 
+	@JsonIgnore
 	public byte[] code = null;
 	private CRNTI crnti = null;
 	private ECGI ecgi = null;
@@ -169,7 +171,7 @@
 			sb.append("\t");
 		}
 		if (crnti != null) {
-			sb.append("\"crnti\": ").append(crnti);
+			sb.append("crnti: ").append(crnti);
 		}
 		
 		sb.append(",\n");
@@ -177,7 +179,7 @@
 			sb.append("\t");
 		}
 		if (ecgi != null) {
-			sb.append("\"ecgi\": ");
+			sb.append("ecgi: ");
 			ecgi.appendAsString(sb, indentLevel + 1);
 		}
 		
@@ -186,7 +188,7 @@
 			sb.append("\t");
 		}
 		if (admEstStatus != null) {
-			sb.append("\"admEstStatus\": ").append(admEstStatus);
+			sb.append("admEstStatus: ").append(admEstStatus);
 		}
 		
 		sb.append("\n");
diff --git a/src/main/java/org.onosproject.xran/codecs/pdu/UECapabilityEnquiry.java b/src/main/java/org.onosproject.xran/codecs/pdu/UECapabilityEnquiry.java
index db212e5..01fa001 100644
--- a/src/main/java/org.onosproject.xran/codecs/pdu/UECapabilityEnquiry.java
+++ b/src/main/java/org.onosproject.xran/codecs/pdu/UECapabilityEnquiry.java
@@ -4,12 +4,13 @@
 
 package org.onosproject.xran.codecs.pdu;
 
+import com.fasterxml.jackson.annotation.JsonIgnore;
 import org.onosproject.xran.codecs.api.CRNTI;
 import org.onosproject.xran.codecs.api.ECGI;
-import org.openmuc.jasn1.ber.BerByteArrayOutputStream;
-import org.openmuc.jasn1.ber.BerLength;
-import org.openmuc.jasn1.ber.BerTag;
-import org.openmuc.jasn1.ber.types.string.BerUTF8String;
+import org.onosproject.xran.codecs.ber.BerByteArrayOutputStream;
+import org.onosproject.xran.codecs.ber.BerLength;
+import org.onosproject.xran.codecs.ber.BerTag;
+import org.onosproject.xran.codecs.ber.types.string.BerUTF8String;
 
 import java.io.IOException;
 import java.io.InputStream;
@@ -23,6 +24,7 @@
 
 	public static final BerTag tag = new BerTag(BerTag.UNIVERSAL_CLASS, BerTag.CONSTRUCTED, 16);
 
+	@JsonIgnore
 	public byte[] code = null;
 	private CRNTI crnti = null;
 	private ECGI ecgi = null;
@@ -148,7 +150,7 @@
 			sb.append("\t");
 		}
 		if (crnti != null) {
-			sb.append("\"crnti\": ").append(crnti);
+			sb.append("crnti: ").append(crnti);
 		}
 		
 		sb.append(",\n");
@@ -156,7 +158,7 @@
 			sb.append("\t");
 		}
 		if (ecgi != null) {
-			sb.append("\"ecgi\": ");
+			sb.append("ecgi: ");
 			ecgi.appendAsString(sb, indentLevel + 1);
 		}
 		
diff --git a/src/main/java/org.onosproject.xran/codecs/pdu/UECapabilityInfo.java b/src/main/java/org.onosproject.xran/codecs/pdu/UECapabilityInfo.java
index a2c017e..732b717 100644
--- a/src/main/java/org.onosproject.xran/codecs/pdu/UECapabilityInfo.java
+++ b/src/main/java/org.onosproject.xran/codecs/pdu/UECapabilityInfo.java
@@ -3,13 +3,14 @@
  */
 package org.onosproject.xran.codecs.pdu;
 
+import com.fasterxml.jackson.annotation.JsonIgnore;
 import org.onosproject.xran.codecs.api.CACap;
 import org.onosproject.xran.codecs.api.CRNTI;
 import org.onosproject.xran.codecs.api.DCCap;
 import org.onosproject.xran.codecs.api.ECGI;
-import org.openmuc.jasn1.ber.BerByteArrayOutputStream;
-import org.openmuc.jasn1.ber.BerLength;
-import org.openmuc.jasn1.ber.BerTag;
+import org.onosproject.xran.codecs.ber.BerByteArrayOutputStream;
+import org.onosproject.xran.codecs.ber.BerLength;
+import org.onosproject.xran.codecs.ber.BerTag;
 
 import java.io.IOException;
 import java.io.InputStream;
@@ -22,6 +23,7 @@
 
 	public static final BerTag tag = new BerTag(BerTag.UNIVERSAL_CLASS, BerTag.CONSTRUCTED, 16);
 
+	@JsonIgnore
 	public byte[] code = null;
 	private CRNTI crnti = null;
 	private ECGI ecgi = null;
@@ -200,7 +202,7 @@
 			sb.append("\t");
 		}
 		if (crnti != null) {
-			sb.append("\"crnti\": ").append(crnti);
+			sb.append("crnti: ").append(crnti);
 		}
 		
 		sb.append(",\n");
@@ -208,7 +210,7 @@
 			sb.append("\t");
 		}
 		if (ecgi != null) {
-			sb.append("\"ecgi\": ");
+			sb.append("ecgi: ");
 			ecgi.appendAsString(sb, indentLevel + 1);
 		}
 		
@@ -217,7 +219,7 @@
 			for (int i = 0; i < indentLevel + 1; i++) {
 				sb.append("\t");
 			}
-			sb.append("\"caCap\": ");
+			sb.append("caCap: ");
 			caCap.appendAsString(sb, indentLevel + 1);
 		}
 		
@@ -226,7 +228,7 @@
 			for (int i = 0; i < indentLevel + 1; i++) {
 				sb.append("\t");
 			}
-			sb.append("\"dcCap\": ");
+			sb.append("dcCap: ");
 			dcCap.appendAsString(sb, indentLevel + 1);
 		}
 		
diff --git a/src/main/java/org.onosproject.xran/codecs/pdu/UEContextUpdate.java b/src/main/java/org.onosproject.xran/codecs/pdu/UEContextUpdate.java
index d9d6066..287316a 100644
--- a/src/main/java/org.onosproject.xran/codecs/pdu/UEContextUpdate.java
+++ b/src/main/java/org.onosproject.xran/codecs/pdu/UEContextUpdate.java
@@ -4,13 +4,14 @@
 
 package org.onosproject.xran.codecs.pdu;
 
+import com.fasterxml.jackson.annotation.JsonIgnore;
 import org.onosproject.xran.codecs.api.CRNTI;
 import org.onosproject.xran.codecs.api.ECGI;
 import org.onosproject.xran.codecs.api.ENBUES1APID;
 import org.onosproject.xran.codecs.api.MMEUES1APID;
-import org.openmuc.jasn1.ber.BerByteArrayOutputStream;
-import org.openmuc.jasn1.ber.BerLength;
-import org.openmuc.jasn1.ber.BerTag;
+import org.onosproject.xran.codecs.ber.BerByteArrayOutputStream;
+import org.onosproject.xran.codecs.ber.BerLength;
+import org.onosproject.xran.codecs.ber.BerTag;
 
 import java.io.IOException;
 import java.io.InputStream;
@@ -22,6 +23,7 @@
 
 	public static final BerTag tag = new BerTag(BerTag.UNIVERSAL_CLASS, BerTag.CONSTRUCTED, 16);
 
+	@JsonIgnore
 	public byte[] code = null;
 	private CRNTI crnti = null;
 	private ECGI ecgi = null;
@@ -193,7 +195,7 @@
 			sb.append("\t");
 		}
 		if (crnti != null) {
-			sb.append("\"crnti\": ").append(crnti);
+			sb.append("crnti: ").append(crnti);
 		}
 		
 		sb.append(",\n");
@@ -201,7 +203,7 @@
 			sb.append("\t");
 		}
 		if (ecgi != null) {
-			sb.append("\"ecgi\": ");
+			sb.append("ecgi: ");
 			ecgi.appendAsString(sb, indentLevel + 1);
 		}
 		
@@ -210,7 +212,7 @@
 			sb.append("\t");
 		}
 		if (mMEUES1APID != null) {
-			sb.append("\"mMEUES1APID\": ").append(mMEUES1APID);
+			sb.append("mMEUES1APID: ").append(mMEUES1APID);
 		}
 		
 		sb.append(",\n");
@@ -218,7 +220,7 @@
 			sb.append("\t");
 		}
 		if (eNBUES1APID != null) {
-			sb.append("\"eNBUES1APID\": ").append(eNBUES1APID);
+			sb.append("eNBUES1APID: ").append(eNBUES1APID);
 		}
 		
 		sb.append("\n");
diff --git a/src/main/java/org.onosproject.xran/codecs/pdu/UEReconfigInd.java b/src/main/java/org.onosproject.xran/codecs/pdu/UEReconfigInd.java
index 4a5fd3d..6aa03ed 100644
--- a/src/main/java/org.onosproject.xran/codecs/pdu/UEReconfigInd.java
+++ b/src/main/java/org.onosproject.xran/codecs/pdu/UEReconfigInd.java
@@ -4,9 +4,10 @@
 
 package org.onosproject.xran.codecs.pdu;
 
-import org.openmuc.jasn1.ber.BerByteArrayOutputStream;
-import org.openmuc.jasn1.ber.BerLength;
-import org.openmuc.jasn1.ber.BerTag;
+import com.fasterxml.jackson.annotation.JsonIgnore;
+import org.onosproject.xran.codecs.ber.BerByteArrayOutputStream;
+import org.onosproject.xran.codecs.ber.BerLength;
+import org.onosproject.xran.codecs.ber.BerTag;
 import org.onosproject.xran.codecs.api.CRNTI;
 import org.onosproject.xran.codecs.api.ECGI;
 import org.onosproject.xran.codecs.api.ReconfIndReason;
@@ -21,6 +22,7 @@
 
 	public static final BerTag tag = new BerTag(BerTag.UNIVERSAL_CLASS, BerTag.CONSTRUCTED, 16);
 
+	@JsonIgnore
 	public byte[] code = null;
 	private CRNTI crntiOld = null;
 	private ECGI ecgi = null;
@@ -192,7 +194,7 @@
 			sb.append("\t");
 		}
 		if (crntiOld != null) {
-			sb.append("\"crntiOld\": ").append(crntiOld);
+			sb.append("crntiOld: ").append(crntiOld);
 		}
 		
 		sb.append(",\n");
@@ -200,7 +202,7 @@
 			sb.append("\t");
 		}
 		if (ecgi != null) {
-			sb.append("\"ecgi\": ");
+			sb.append("ecgi: ");
 			ecgi.appendAsString(sb, indentLevel + 1);
 		}
 		
@@ -209,7 +211,7 @@
 			sb.append("\t");
 		}
 		if (crntiNew != null) {
-			sb.append("\"crntiNew\": ").append(crntiNew);
+			sb.append("crntiNew: ").append(crntiNew);
 		}
 		
 		sb.append(",\n");
@@ -217,7 +219,7 @@
 			sb.append("\t");
 		}
 		if (reconfigCause != null) {
-			sb.append("\"reconfigCause\": ").append(reconfigCause);
+			sb.append("reconfigCause: ").append(reconfigCause);
 		}
 		
 		sb.append("\n");
diff --git a/src/main/java/org.onosproject.xran/codecs/pdu/UEReleaseInd.java b/src/main/java/org.onosproject.xran/codecs/pdu/UEReleaseInd.java
index 9b601ad..fef213f 100644
--- a/src/main/java/org.onosproject.xran/codecs/pdu/UEReleaseInd.java
+++ b/src/main/java/org.onosproject.xran/codecs/pdu/UEReleaseInd.java
@@ -3,9 +3,10 @@
  */
 package org.onosproject.xran.codecs.pdu;
 
-import org.openmuc.jasn1.ber.BerByteArrayOutputStream;
-import org.openmuc.jasn1.ber.BerLength;
-import org.openmuc.jasn1.ber.BerTag;
+import com.fasterxml.jackson.annotation.JsonIgnore;
+import org.onosproject.xran.codecs.ber.BerByteArrayOutputStream;
+import org.onosproject.xran.codecs.ber.BerLength;
+import org.onosproject.xran.codecs.ber.BerTag;
 import org.onosproject.xran.codecs.api.CRNTI;
 import org.onosproject.xran.codecs.api.ECGI;
 import org.onosproject.xran.codecs.api.RelCause;
@@ -20,6 +21,7 @@
 
 	public static final BerTag tag = new BerTag(BerTag.UNIVERSAL_CLASS, BerTag.CONSTRUCTED, 16);
 
+	@JsonIgnore
 	public byte[] code = null;
 	private CRNTI crnti = null;
 	private ECGI ecgi = null;
@@ -168,7 +170,7 @@
 			sb.append("\t");
 		}
 		if (crnti != null) {
-			sb.append("\"crnti\": ").append(crnti);
+			sb.append("crnti: ").append(crnti);
 		}
 		
 		sb.append(",\n");
@@ -176,7 +178,7 @@
 			sb.append("\t");
 		}
 		if (ecgi != null) {
-			sb.append("\"ecgi\": ");
+			sb.append("ecgi: ");
 			ecgi.appendAsString(sb, indentLevel + 1);
 		}
 		
@@ -185,7 +187,7 @@
 			sb.append("\t");
 		}
 		if (releaseCause != null) {
-			sb.append("\"releaseCause\": ").append(releaseCause);
+			sb.append("releaseCause: ").append(releaseCause);
 		}
 		
 		sb.append("\n");
diff --git a/src/main/java/org.onosproject.xran/codecs/pdu/XICICConfig.java b/src/main/java/org.onosproject.xran/codecs/pdu/XICICConfig.java
index 2d1bc70..7d841c9 100644
--- a/src/main/java/org.onosproject.xran/codecs/pdu/XICICConfig.java
+++ b/src/main/java/org.onosproject.xran/codecs/pdu/XICICConfig.java
@@ -3,16 +3,17 @@
  */
 package org.onosproject.xran.codecs.pdu;
 
+import com.fasterxml.jackson.annotation.JsonIgnore;
 import org.onosproject.xran.codecs.api.CRNTI;
 import org.onosproject.xran.codecs.api.ECGI;
 import org.onosproject.xran.codecs.api.PCIARFCN;
 import org.onosproject.xran.codecs.api.XICICPA;
-import org.openmuc.jasn1.ber.BerByteArrayOutputStream;
-import org.openmuc.jasn1.ber.BerLength;
-import org.openmuc.jasn1.ber.BerTag;
-import org.openmuc.jasn1.ber.types.BerBitString;
-import org.openmuc.jasn1.ber.types.BerInteger;
-import org.openmuc.jasn1.ber.types.string.BerUTF8String;
+import org.onosproject.xran.codecs.ber.BerByteArrayOutputStream;
+import org.onosproject.xran.codecs.ber.BerLength;
+import org.onosproject.xran.codecs.ber.BerTag;
+import org.onosproject.xran.codecs.ber.types.BerBitString;
+import org.onosproject.xran.codecs.ber.types.BerInteger;
+import org.onosproject.xran.codecs.ber.types.string.BerUTF8String;
 
 import java.io.IOException;
 import java.io.InputStream;
@@ -25,6 +26,7 @@
 
 	public static final BerTag tag = new BerTag(BerTag.UNIVERSAL_CLASS, BerTag.CONSTRUCTED, 16);
 
+	@JsonIgnore
 	public byte[] code = null;
 	private ECGI ecgi = null;
 	private PCIARFCN pciArfcn = null;
@@ -374,7 +376,7 @@
 			sb.append("\t");
 		}
 		if (ecgi != null) {
-			sb.append("\"ecgi: \"");
+			sb.append("ecgi: ");
 			ecgi.appendAsString(sb, indentLevel + 1);
 		}
 
@@ -383,7 +385,7 @@
 			for (int i = 0; i < indentLevel + 1; i++) {
 				sb.append("\t");
 			}
-			sb.append("\"pciArfcn: \"");
+			sb.append("pciArfcn: ");
 			pciArfcn.appendAsString(sb, indentLevel + 1);
 		}
 
@@ -392,7 +394,7 @@
 			sb.append("\t");
 		}
 		if (crnti != null) {
-			sb.append("\"crnti: \"").append(crnti);
+			sb.append("crnti: ").append(crnti);
 		}
 
 		if (pa != null) {
@@ -400,7 +402,7 @@
 			for (int i = 0; i < indentLevel + 1; i++) {
 				sb.append("\t");
 			}
-			sb.append("\"pa: \"").append(pa);
+			sb.append("pa: ").append(pa);
 		}
 
 		if (startPrbDl != null) {
@@ -408,7 +410,7 @@
 			for (int i = 0; i < indentLevel + 1; i++) {
 				sb.append("\t");
 			}
-			sb.append("\"startPrbDl: \"").append(startPrbDl);
+			sb.append("startPrbDl: ").append(startPrbDl);
 		}
 
 		if (endPrbDl != null) {
@@ -416,7 +418,7 @@
 			for (int i = 0; i < indentLevel + 1; i++) {
 				sb.append("\t");
 			}
-			sb.append("\"endPrbDl: \"").append(endPrbDl);
+			sb.append("endPrbDl: ").append(endPrbDl);
 		}
 
 		if (subframeBitmaskDl != null) {
@@ -424,7 +426,7 @@
 			for (int i = 0; i < indentLevel + 1; i++) {
 				sb.append("\t");
 			}
-			sb.append("\"subframeBitmaskDl: \"").append(subframeBitmaskDl);
+			sb.append("subframeBitmaskDl: ").append(subframeBitmaskDl);
 		}
 
 		if (p0UePusch != null) {
@@ -432,7 +434,7 @@
 			for (int i = 0; i < indentLevel + 1; i++) {
 				sb.append("\t");
 			}
-			sb.append("\"p0UePusch: \"").append(p0UePusch);
+			sb.append("p0UePusch: ").append(p0UePusch);
 		}
 
 		if (startPrbUl != null) {
@@ -440,7 +442,7 @@
 			for (int i = 0; i < indentLevel + 1; i++) {
 				sb.append("\t");
 			}
-			sb.append("\"startPrbUl: \"").append(startPrbUl);
+			sb.append("startPrbUl: ").append(startPrbUl);
 		}
 
 		if (endPrbUl != null) {
@@ -448,7 +450,7 @@
 			for (int i = 0; i < indentLevel + 1; i++) {
 				sb.append("\t");
 			}
-			sb.append("\"endPrbUl: \"").append(endPrbUl);
+			sb.append("endPrbUl: ").append(endPrbUl);
 		}
 
 		if (subframeBitmaskUl != null) {
@@ -456,7 +458,7 @@
 			for (int i = 0; i < indentLevel + 1; i++) {
 				sb.append("\t");
 			}
-			sb.append("\"subframeBitmaskUl: \"").append(subframeBitmaskUl);
+			sb.append("subframeBitmaskUl: ").append(subframeBitmaskUl);
 		}
 
 		sb.append("\n");
diff --git a/src/main/java/org.onosproject.xran/codecs/pdu/XrancApiID.java b/src/main/java/org.onosproject.xran/codecs/pdu/XrancApiID.java
index 341b70f..fa902f8 100644
--- a/src/main/java/org.onosproject.xran/codecs/pdu/XrancApiID.java
+++ b/src/main/java/org.onosproject.xran/codecs/pdu/XrancApiID.java
@@ -4,7 +4,7 @@
 
 package org.onosproject.xran.codecs.pdu;
 
-import org.openmuc.jasn1.ber.types.BerEnum;
+import org.onosproject.xran.codecs.ber.types.BerEnum;
 
 import java.math.BigInteger;
 
diff --git a/src/main/java/org.onosproject.xran/codecs/pdu/XrancPdu.java b/src/main/java/org.onosproject.xran/codecs/pdu/XrancPdu.java
index d365a39..d983713 100644
--- a/src/main/java/org.onosproject.xran/codecs/pdu/XrancPdu.java
+++ b/src/main/java/org.onosproject.xran/codecs/pdu/XrancPdu.java
@@ -4,9 +4,10 @@
 
 package org.onosproject.xran.codecs.pdu;
 
-import org.openmuc.jasn1.ber.BerByteArrayOutputStream;
-import org.openmuc.jasn1.ber.BerLength;
-import org.openmuc.jasn1.ber.BerTag;
+import com.fasterxml.jackson.annotation.JsonIgnore;
+import org.onosproject.xran.codecs.ber.BerByteArrayOutputStream;
+import org.onosproject.xran.codecs.ber.BerLength;
+import org.onosproject.xran.codecs.ber.BerTag;
 
 import java.io.IOException;
 import java.io.InputStream;
@@ -18,6 +19,7 @@
 
 	public static final BerTag tag = new BerTag(BerTag.UNIVERSAL_CLASS, BerTag.CONSTRUCTED, 16);
 
+	@JsonIgnore
 	public byte[] code = null;
 	private XrancPduHdr hdr = null;
 	private XrancPduBody body = null;
@@ -148,7 +150,7 @@
 			sb.append("\t");
 		}
 		if (hdr != null) {
-			sb.append("\"hdr\": ");
+			sb.append("hdr: ");
 			hdr.appendAsString(sb, indentLevel + 1);
 		}
 		
@@ -157,7 +159,7 @@
 			sb.append("\t");
 		}
 		if (body != null) {
-			sb.append("\"body\": ");
+			sb.append("body: ");
 			body.appendAsString(sb, indentLevel + 1);
 		}
 		
diff --git a/src/main/java/org.onosproject.xran/codecs/pdu/XrancPduBody.java b/src/main/java/org.onosproject.xran/codecs/pdu/XrancPduBody.java
index 2770211..29bef78 100644
--- a/src/main/java/org.onosproject.xran/codecs/pdu/XrancPduBody.java
+++ b/src/main/java/org.onosproject.xran/codecs/pdu/XrancPduBody.java
@@ -4,8 +4,9 @@
 
 package org.onosproject.xran.codecs.pdu;
 
-import org.openmuc.jasn1.ber.BerByteArrayOutputStream;
-import org.openmuc.jasn1.ber.BerTag;
+import com.fasterxml.jackson.annotation.JsonIgnore;
+import org.onosproject.xran.codecs.ber.BerByteArrayOutputStream;
+import org.onosproject.xran.codecs.ber.BerTag;
 
 import java.io.IOException;
 import java.io.InputStream;
@@ -15,6 +16,7 @@
 
 	private static final long serialVersionUID = 1L;
 
+	@JsonIgnore
 	public byte[] code = null;
 	private CellConfigRequest cellConfigRequest = null;
 	private CellConfigReport cellConfigReport = null;
@@ -882,211 +884,211 @@
 	public void appendAsString(StringBuilder sb, int indentLevel) {
 
 		if (cellConfigRequest != null) {
-			sb.append("\"cellConfigRequest\": ");
+			sb.append("cellConfigRequest: ");
 			cellConfigRequest.appendAsString(sb, indentLevel + 1);
 			return;
 		}
 
 		if (cellConfigReport != null) {
-			sb.append("\"cellConfigReport\": ");
+			sb.append("cellConfigReport: ");
 			cellConfigReport.appendAsString(sb, indentLevel + 1);
 			return;
 		}
 
 		if (uEAdmissionRequest != null) {
-			sb.append("\"uEAdmissionRequest\": ");
+			sb.append("uEAdmissionRequest: ");
 			uEAdmissionRequest.appendAsString(sb, indentLevel + 1);
 			return;
 		}
 
 		if (uEAdmissionResponse != null) {
-			sb.append("\"uEAdmissionResponse\": ");
+			sb.append("uEAdmissionResponse: ");
 			uEAdmissionResponse.appendAsString(sb, indentLevel + 1);
 			return;
 		}
 
 		if (uEContextUpdate != null) {
-			sb.append("\"uEContextUpdate\": ");
+			sb.append("uEContextUpdate: ");
 			uEContextUpdate.appendAsString(sb, indentLevel + 1);
 			return;
 		}
 
 		if (uEAdmissionStatus != null) {
-			sb.append("\"uEAdmissionStatus\": ");
+			sb.append("uEAdmissionStatus: ");
 			uEAdmissionStatus.appendAsString(sb, indentLevel + 1);
 			return;
 		}
 
 		if (uEReconfigInd != null) {
-			sb.append("\"uEReconfigInd\": ");
+			sb.append("uEReconfigInd: ");
 			uEReconfigInd.appendAsString(sb, indentLevel + 1);
 			return;
 		}
 
 		if (uEReleaseInd != null) {
-			sb.append("\"uEReleaseInd\": ");
+			sb.append("uEReleaseInd: ");
 			uEReleaseInd.appendAsString(sb, indentLevel + 1);
 			return;
 		}
 
 		if (bearerAdmissionRequest != null) {
-			sb.append("\"bearerAdmissionRequest\": ");
+			sb.append("bearerAdmissionRequest: ");
 			bearerAdmissionRequest.appendAsString(sb, indentLevel + 1);
 			return;
 		}
 
 		if (bearerAdmissionResponse != null) {
-			sb.append("\"bearerAdmissionResponse\": ");
+			sb.append("bearerAdmissionResponse: ");
 			bearerAdmissionResponse.appendAsString(sb, indentLevel + 1);
 			return;
 		}
 
 		if (bearerAdmissionStatus != null) {
-			sb.append("\"bearerAdmissionStatus\": ");
+			sb.append("bearerAdmissionStatus: ");
 			bearerAdmissionStatus.appendAsString(sb, indentLevel + 1);
 			return;
 		}
 
 		if (bearerReleaseInd != null) {
-			sb.append("\"bearerReleaseInd\": ");
+			sb.append("bearerReleaseInd: ");
 			bearerReleaseInd.appendAsString(sb, indentLevel + 1);
 			return;
 		}
 
 		if (uECapabilityEnquiry != null) {
-			sb.append("\"uECapabilityEnquiry\": ");
+			sb.append("uECapabilityEnquiry: ");
 			uECapabilityEnquiry.appendAsString(sb, indentLevel + 1);
 			return;
 		}
 
 		if (uECapabilityInfo != null) {
-			sb.append("\"uECapabilityInfo\": ");
+			sb.append("uECapabilityInfo: ");
 			uECapabilityInfo.appendAsString(sb, indentLevel + 1);
 			return;
 		}
 
 		if (hORequest != null) {
-			sb.append("\"hORequest\": ");
+			sb.append("hORequest: ");
 			hORequest.appendAsString(sb, indentLevel + 1);
 			return;
 		}
 
 		if (hOFailure != null) {
-			sb.append("\"hOFailure\": ");
+			sb.append("hOFailure: ");
 			hOFailure.appendAsString(sb, indentLevel + 1);
 			return;
 		}
 
 		if (hOComplete != null) {
-			sb.append("\"hOComplete\": ");
+			sb.append("hOComplete: ");
 			hOComplete.appendAsString(sb, indentLevel + 1);
 			return;
 		}
 
 		if (rXSigMeasConfig != null) {
-			sb.append("\"rXSigMeasConfig\": ");
+			sb.append("rXSigMeasConfig: ");
 			rXSigMeasConfig.appendAsString(sb, indentLevel + 1);
 			return;
 		}
 
 		if (rXSigMeasReport != null) {
-			sb.append("\"rXSigMeasReport\": ");
+			sb.append("rXSigMeasReport: ");
 			rXSigMeasReport.appendAsString(sb, indentLevel + 1);
 			return;
 		}
 
 		if (l2MeasConfig != null) {
-			sb.append("\"l2MeasConfig\": ");
+			sb.append("l2MeasConfig: ");
 			l2MeasConfig.appendAsString(sb, indentLevel + 1);
 			return;
 		}
 
 		if (radioMeasReportPerUE != null) {
-			sb.append("\"radioMeasReportPerUE\": ");
+			sb.append("radioMeasReportPerUE: ");
 			radioMeasReportPerUE.appendAsString(sb, indentLevel + 1);
 			return;
 		}
 
 		if (radioMeasReportPerCell != null) {
-			sb.append("\"radioMeasReportPerCell\": ");
+			sb.append("radioMeasReportPerCell: ");
 			radioMeasReportPerCell.appendAsString(sb, indentLevel + 1);
 			return;
 		}
 
 		if (schedMeasReportPerUE != null) {
-			sb.append("\"schedMeasReportPerUE\": ");
+			sb.append("schedMeasReportPerUE: ");
 			schedMeasReportPerUE.appendAsString(sb, indentLevel + 1);
 			return;
 		}
 
 		if (schedMeasReportPerCell != null) {
-			sb.append("\"schedMeasReportPerCell\": ");
+			sb.append("schedMeasReportPerCell: ");
 			schedMeasReportPerCell.appendAsString(sb, indentLevel + 1);
 			return;
 		}
 
 		if (pDCPMeasReportPerUe != null) {
-			sb.append("\"pDCPMeasReportPerUe\": ");
+			sb.append("pDCPMeasReportPerUe: ");
 			pDCPMeasReportPerUe.appendAsString(sb, indentLevel + 1);
 			return;
 		}
 
 		if (xICICConfig != null) {
-			sb.append("\"xICICConfig\": ");
+			sb.append("xICICConfig: ");
 			xICICConfig.appendAsString(sb, indentLevel + 1);
 			return;
 		}
 
 		if (rRMConfig != null) {
-			sb.append("\"rRMConfig\": ");
+			sb.append("rRMConfig: ");
 			rRMConfig.appendAsString(sb, indentLevel + 1);
 			return;
 		}
 
 		if (rRMConfigStatus != null) {
-			sb.append("\"rRMConfigStatus\": ");
+			sb.append("rRMConfigStatus: ");
 			rRMConfigStatus.appendAsString(sb, indentLevel + 1);
 			return;
 		}
 
 		if (scellAdd != null) {
-			sb.append("\"scellAdd\": ");
+			sb.append("scellAdd: ");
 			scellAdd.appendAsString(sb, indentLevel + 1);
 			return;
 		}
 
 		if (scellAddStatus != null) {
-			sb.append("\"scellAddStatus\": ");
+			sb.append("scellAddStatus: ");
 			scellAddStatus.appendAsString(sb, indentLevel + 1);
 			return;
 		}
 
 		if (scellDelete != null) {
-			sb.append("\"scellDelete\": ");
+			sb.append("scellDelete: ");
 			scellDelete.appendAsString(sb, indentLevel + 1);
 			return;
 		}
 
 		if (seNBAdd != null) {
-			sb.append("\"seNBAdd\": ");
+			sb.append("seNBAdd: ");
 			seNBAdd.appendAsString(sb, indentLevel + 1);
 			return;
 		}
 
 		if (seNBAddStatus != null) {
-			sb.append("\"seNBAddStatus\": ");
+			sb.append("seNBAddStatus: ");
 			seNBAddStatus.appendAsString(sb, indentLevel + 1);
 			return;
 		}
 
 		if (seNBDelete != null) {
-			sb.append("\"seNBDelete\": ");
+			sb.append("seNBDelete: ");
 			seNBDelete.appendAsString(sb, indentLevel + 1);
 			return;
 		}
 
 		if (trafficSplitConfig != null) {
-			sb.append("\"trafficSplitConfig\": ");
+			sb.append("trafficSplitConfig: ");
 			trafficSplitConfig.appendAsString(sb, indentLevel + 1);
 			return;
 		}
diff --git a/src/main/java/org.onosproject.xran/codecs/pdu/XrancPduHdr.java b/src/main/java/org.onosproject.xran/codecs/pdu/XrancPduHdr.java
index 63480d4..124e692 100644
--- a/src/main/java/org.onosproject.xran/codecs/pdu/XrancPduHdr.java
+++ b/src/main/java/org.onosproject.xran/codecs/pdu/XrancPduHdr.java
@@ -4,10 +4,11 @@
 
 package org.onosproject.xran.codecs.pdu;
 
-import org.openmuc.jasn1.ber.BerByteArrayOutputStream;
-import org.openmuc.jasn1.ber.BerLength;
-import org.openmuc.jasn1.ber.BerTag;
-import org.openmuc.jasn1.ber.types.string.BerUTF8String;
+import com.fasterxml.jackson.annotation.JsonIgnore;
+import org.onosproject.xran.codecs.ber.BerByteArrayOutputStream;
+import org.onosproject.xran.codecs.ber.BerLength;
+import org.onosproject.xran.codecs.ber.BerTag;
+import org.onosproject.xran.codecs.ber.types.string.BerUTF8String;
 
 import java.io.IOException;
 import java.io.InputStream;
@@ -19,6 +20,7 @@
 
 	public static final BerTag tag = new BerTag(BerTag.UNIVERSAL_CLASS, BerTag.CONSTRUCTED, 16);
 
+	@JsonIgnore
 	public byte[] code = null;
 	private BerUTF8String ver = null;
 	private XrancApiID apiId = null;
@@ -144,7 +146,7 @@
 			sb.append("\t");
 		}
 		if (ver != null) {
-			sb.append("\"ver\": ").append(ver);
+			sb.append("ver: ").append(ver);
 		}
 		
 		sb.append(",\n");
@@ -152,7 +154,7 @@
 			sb.append("\t");
 		}
 		if (apiId != null) {
-			sb.append("\"apiId\": ").append(apiId);
+			sb.append("apiId: ").append(apiId);
 		}
 		
 		sb.append("\n");
diff --git a/src/main/java/org.onosproject.xran/codecs/util/HexConverter.java b/src/main/java/org.onosproject.xran/codecs/util/HexConverter.java
new file mode 100644
index 0000000..2ffddb7
--- /dev/null
+++ b/src/main/java/org.onosproject.xran/codecs/util/HexConverter.java
@@ -0,0 +1,155 @@
+package org.onosproject.xran.codecs.util;
+
+public class HexConverter {
+
+    public static String toHexString(byte b) {
+        StringBuilder builder = new StringBuilder();
+        appendHexString(b, builder);
+        return builder.toString();
+    }
+
+    public static String toHexString(byte[] bytes) {
+        return toHexString(bytes, 0, bytes.length);
+    }
+
+    public static String toHexString(byte[] bytes, int offset, int length) {
+        StringBuilder builder = new StringBuilder();
+
+        int l = 1;
+        for (int i = offset; i < (offset + length); i++) {
+            if ((l != 1) && ((l - 1) % 8 == 0)) {
+                builder.append(' ');
+            }
+            if ((l != 1) && ((l - 1) % 16 == 0)) {
+                builder.append('\n');
+            }
+            l++;
+            appendHexString(bytes[i], builder);
+            if (i != offset + length - 1) {
+                builder.append(' ');
+            }
+        }
+
+        return builder.toString();
+    }
+
+    /**
+     * Returns the integer value as hex string filled with leading zeros. If you do not want leading zeros use
+     * Integer.toHexString(int i) instead.
+     * 
+     * @param i
+     *            the integer value to be converted
+     * @return the hex string
+     */
+    public static String toShortHexString(int i) {
+        byte[] bytes = new byte[] { (byte) (i >> 24), (byte) (i >> 16), (byte) (i >> 8), (byte) (i) };
+        return toShortHexString(bytes);
+    }
+
+    /**
+     * Returns the long value as hex string filled with leading zeros. If you do not want leading zeros use
+     * Long.toHexString(long i) instead.
+     * 
+     * @param l
+     *            the long value to be converted
+     * @return the hex string
+     */
+    public static String toShortHexString(long l) {
+        byte[] bytes = new byte[] { (byte) (l >> 56), (byte) (l >> 48), (byte) (l >> 40), (byte) (l >> 32),
+                (byte) (l >> 24), (byte) (l >> 16), (byte) (l >> 8), (byte) (l) };
+        return toShortHexString(bytes);
+    }
+
+    /**
+     * Returns the byte as a hex string. If b is less than 16 the hex string returned contains a leading zero.
+     * 
+     * @param b
+     *            the byte to be converted
+     * @return the byte as a hex string.
+     */
+    public static String toShortHexString(byte b) {
+        return toShortHexString(new byte[] { b });
+    }
+
+    private final static char[] hexArray = "0123456789ABCDEF".toCharArray();
+
+    public static String toShortHexString(byte[] bytes) {
+        return toShortHexString(bytes, 0, bytes.length);
+    }
+
+    public static String toShortHexString(byte[] bytes, int offset, int length) {
+        char[] hexChars = new char[length * 2];
+        for (int j = offset; j < (offset + length); j++) {
+            int v = bytes[j] & 0xff;
+            hexChars[j * 2] = hexArray[v >>> 4];
+            hexChars[j * 2 + 1] = hexArray[v & 0x0f];
+        }
+        return new String(hexChars);
+    }
+
+    public static byte[] fromShortHexString(String shortHexString) throws NumberFormatException {
+
+        validate(shortHexString);
+
+        int length = shortHexString.length();
+
+        byte[] data = new byte[length / 2];
+        for (int i = 0; i < length; i += 2) {
+            int firstCharacter = Character.digit(shortHexString.charAt(i), 16);
+            int secondCharacter = Character.digit(shortHexString.charAt(i + 1), 16);
+
+            if (firstCharacter == -1 || secondCharacter == -1) {
+                throw new NumberFormatException("string is not a legal hex string.");
+            }
+
+            data[i / 2] = (byte) ((firstCharacter << 4) + secondCharacter);
+        }
+        return data;
+    }
+
+    public static void appendShortHexString(byte b, StringBuilder builder) {
+        builder.append(toShortHexString(b));
+    }
+
+    public static void appendShortHexString(StringBuilder builder, byte[] bytes, int offset, int length) {
+        builder.append(toShortHexString(bytes, offset, length));
+    }
+
+    public static void appendHexString(byte b, StringBuilder builder) {
+        builder.append("0x");
+        appendShortHexString(b, builder);
+    }
+
+    public static void appendHexString(StringBuilder builder, byte[] byteArray, int offset, int length) {
+        int l = 1;
+        for (int i = offset; i < (offset + length); i++) {
+            if ((l != 1) && ((l - 1) % 8 == 0)) {
+                builder.append(' ');
+            }
+            if ((l != 1) && ((l - 1) % 16 == 0)) {
+                builder.append('\n');
+            }
+            l++;
+            appendHexString(byteArray[i], builder);
+            if (i != offset + length - 1) {
+                builder.append(' ');
+            }
+        }
+    }
+
+    private static void validate(String s) {
+        if (s == null) {
+            throw new IllegalArgumentException("string s may not be null");
+        }
+
+        if ((s.length() == 0) || ((s.length() % 2) != 0)) {
+            throw new NumberFormatException("string is not a legal hex string.");
+        }
+    }
+
+    /**
+     * Don't let anyone instantiate this class.
+     */
+    private HexConverter() {
+    }
+}
