@@ -4,7 +4,7 @@ namespace PowerSync.Common.Tests.Client.Sync;
44
55using Microsoft . Data . Sqlite ;
66using Microsoft . Extensions . Logging ;
7-
7+ using Newtonsoft . Json ;
88using PowerSync . Common . Client ;
99using PowerSync . Common . Client . Sync . Bucket ;
1010using PowerSync . Common . DB . Schema ;
@@ -17,7 +17,7 @@ class TestData
1717 Op = new OpType ( OpTypeEnum . PUT ) . ToJSON ( ) ,
1818 ObjectType = "assets" ,
1919 ObjectId = "O1" ,
20- Data = new { description = "bar" } ,
20+ Data = JsonConvert . SerializeObject ( new { description = "bar" } ) ,
2121 Checksum = 1
2222 } ) ;
2323
@@ -27,7 +27,7 @@ class TestData
2727 Op = new OpType ( OpTypeEnum . PUT ) . ToJSON ( ) ,
2828 ObjectType = "assets" ,
2929 ObjectId = "O2" ,
30- Data = new { description = "bar" } ,
30+ Data = JsonConvert . SerializeObject ( new { description = "bar" } ) ,
3131 Checksum = 2
3232 } ) ;
3333
@@ -37,7 +37,7 @@ class TestData
3737 Op = new OpType ( OpTypeEnum . PUT ) . ToJSON ( ) ,
3838 ObjectType = "assets" ,
3939 ObjectId = "O1" ,
40- Data = new { description = "bard" } ,
40+ Data = JsonConvert . SerializeObject ( new { description = "bard" } ) ,
4141 Checksum = 3
4242 } ) ;
4343
@@ -235,7 +235,7 @@ public async Task ShouldUseSubkeys()
235235 Subkey = "b" ,
236236 ObjectType = "assets" ,
237237 ObjectId = "O1" ,
238- Data = new { description = "B" } ,
238+ Data = JsonConvert . SerializeObject ( new { description = "B" } ) ,
239239 Checksum = 4
240240 } ) ;
241241
@@ -863,7 +863,7 @@ await bucketStorage.SaveSyncData(
863863 ObjectType = "assets" ,
864864 ObjectId = "O3" ,
865865 Checksum = 5 ,
866- Data = new { description = "server updated" }
866+ Data = JsonConvert . SerializeObject ( new { description = "server updated" } )
867867 } )
868868 ] , false )
869869 ] )
0 commit comments