private void SerializeValue(object value)
{
if (value == null)
{
this.builder.Append("null");
}
else
{
string str = value as string;
if (str != null)
{
this.SerializeString(str);
}
else if (value is bool)
{
this.builder.Append(!((bool) value) ? "false" : "true");
}
else
{
IList anArray = value as IList;
if (anArray != null)
{
this.SerializeArray(anArray);
}
else
{
IDictionary dictionary = value as IDictionary;
if (dictionary != null)
{
this.SerializeObject(dictionary);
}
else if (value is char)
{
this.SerializeString(new string((char) value, 1));
}
else
{
this.SerializeOther(value);
}
}
}
}
}
}