private static bool SerializeValue(IJsonSerializerStrategy jsonSerializerStrategy, object value, StringBuilder builder) { bool flag = true; string text = value as string; if (value == null) { builder.Append("null"); } else if (text != null) { flag = PlayFabSimpleJson.SerializeString(text, builder); } else { IDictionary <string, object> dictionary = value as IDictionary <string, object>; Type type = value.GetType(); Type[] genericTypeArguments = ReflectionUtils.GetGenericTypeArguments(type); bool flag2 = type.IsGenericType && type.GetGenericTypeDefinition() == typeof(Dictionary <, >) && genericTypeArguments[0] == typeof(string); if (flag2) { IDictionary dictionary2 = value as IDictionary; flag = PlayFabSimpleJson.SerializeObject(jsonSerializerStrategy, dictionary2.Keys, dictionary2.Values, builder); } else if (dictionary != null) { flag = PlayFabSimpleJson.SerializeObject(jsonSerializerStrategy, dictionary.Keys, dictionary.Values, builder); } else { IDictionary <string, string> dictionary3 = value as IDictionary <string, string>; if (dictionary3 != null) { flag = PlayFabSimpleJson.SerializeObject(jsonSerializerStrategy, dictionary3.Keys, dictionary3.Values, builder); } else { IEnumerable enumerable = value as IEnumerable; if (enumerable != null) { flag = PlayFabSimpleJson.SerializeArray(jsonSerializerStrategy, enumerable, builder); } else if (PlayFabSimpleJson.IsNumeric(value)) { flag = PlayFabSimpleJson.SerializeNumber(value, builder); } else if (value is bool) { builder.Append((!(bool)value) ? "false" : "true"); } else { object value2; flag = jsonSerializerStrategy.TrySerializeNonPrimitiveObject(value, out value2); if (flag) { PlayFabSimpleJson.SerializeValue(jsonSerializerStrategy, value2, builder); } } } } } return(flag); }