void Contravariant.IJsonAdapter <UnityObject> .Serialize(IJsonSerializationContext context, UnityObject value) { #if UNITY_EDITOR var id = UnityEditor.GlobalObjectId.GetGlobalObjectIdSlow(value).ToString(); context.Writer.WriteValue(id); #else context.Writer.WriteNull(); #endif }
public unsafe JsonElement Serialize(Java.Lang.Object p0, IType p1, IJsonSerializationContext p2) { const string __id = "serialize.(Lcom/google/android/ads/mediationtestsuite/dataobjects/AdFormat;Ljava/lang/reflect/Type;Lcom/google/gson/JsonSerializationContext;)Lcom/google/gson/JsonElement;"; try { JniArgumentValue *__args = stackalloc JniArgumentValue[3]; __args[0] = new JniArgumentValue((p0 == null) ? IntPtr.Zero : ((global::Java.Lang.Object)p0).Handle); __args[1] = new JniArgumentValue((p1 == null) ? IntPtr.Zero : ((global::Java.Lang.Object)p1).Handle); __args[2] = new JniArgumentValue((p2 == null) ? IntPtr.Zero : ((global::Java.Lang.Object)p2).Handle); var __rm = _members.InstanceMethods.InvokeVirtualObjectMethod(__id, this, __args); return(global::Java.Lang.Object.GetObject <global::GoogleGson.JsonElement>(__rm.Handle, JniHandleOwnership.TransferLocalRef)); } finally { } }
public JsonElement Serialize(Java.Lang.Object p0, IType p1, IJsonSerializationContext p2) { return(Serialize(p0 as ValueWrapper, p1, p2)); }
public JsonElement Serialize(Java.Lang.Object p0, IType p1, IJsonSerializationContext p2) { return(Serialize((Com.Mapbox.Geojson.Point)p0, p1, p2)); }
public void Serialize(IJsonSerializationContext context, Dog value) { context.Writer.WriteValue("a dog"); }
public void Serialize(IJsonSerializationContext context, IAnimal value) { context.Writer.WriteValue("an animal"); }
public void Serialize(IJsonSerializationContext context, IShape value) { context.Writer.WriteValue("a shape"); }