Skip to content

Commit 7a29726

Browse files
committed
Properly serialize UrlSource Property for Cached Items
1 parent f31b13d commit 7a29726

File tree

2 files changed

+8
-2
lines changed

2 files changed

+8
-2
lines changed

XPlatformCloudKit/XPlatformCloudKit.PCL/Models/Item.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,7 @@ public string Group
9090
/// <summary>
9191
/// Contains the UrlSource where exists for the Item - YoutubeSource, RssSource, TwitterSource etc.
9292
/// </summary>
93-
public UrlSource UrlSource { get; set; }
93+
[DataMember(Name = "urlSource", EmitDefaultValue=false)]
94+
public virtual UrlSource UrlSource { get; set; }
9495
}
9596
}

XPlatformCloudKit/XPlatformCloudKit.PCL/Models/UrlSource.cs

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,18 +6,23 @@
66
using System.Linq;
77
using System.Text;
88
using System.Threading.Tasks;
9+
using System.Runtime.Serialization;
910

1011
namespace XPlatformCloudKit.Models
1112
{
13+
[DataContract]
1214
public class UrlSource
1315
{
1416
public UrlSource()
1517
{
1618
Group = "";
1719
}
18-
20+
21+
[DataMember(Name = "url")]
1922
public string Url { get; set; }
23+
[DataMember(Name = "group")]
2024
public string Group { get; set; }
25+
[DataMember(Name = "type")]
2126
public string Type { get; set; }
2227
}
2328
}

0 commit comments

Comments
 (0)