internal JsonDataObject Deserialize(string dataToDeserialize)
        {
            object dataResponse = serializer.Deserialize(dataToDeserialize, typeof(object));

            if (dataResponse is JsonDataObject)
                return dataResponse as JsonDataObject;
            else if (dataResponse is object[])
            {
                JsonDataObject dataObject = new JsonDataObject();
                ArrayList arrayList = new ArrayList();
                object[] foundItems = dataResponse as object[];
                foreach (object currentItem in foundItems)
                    arrayList.Add(currentItem);

                dataObject["FoundItems"] = arrayList;
                return dataObject;
            }
            else
                throw new InvalidCodeException("Unknown handling of response.");
        }
 internal string Serialize(JsonDataObject dataObject)
 {
     StringBuilder sb = new StringBuilder();
     SerializeDictionary(sb, dataObject.Values);
     return sb.ToString();
 }