Ras Gulla
Ras Gulla
Explore posts from servers
CC#
Created by Ras Gulla on 1/15/2025 in #help
Newtonsoft Json not deserializing with some property/constructor names
Thank You so much 🫶
42 replies
CC#
Created by Ras Gulla on 1/15/2025 in #help
Newtonsoft Json not deserializing with some property/constructor names
Guys I just confirmed, it was an issue with constructor and had nothing to do with name as I was thinking. This worked perfectly fine:
public class TestCommand : BaseCommand<TestCommand>
{
public string ID { get; set; }
public int UniqueID { get; set; }
public int SomeNumber { get; set; }

public TestCommand(int number, int uid, string id)
{
ID = id;
UniqueID = uid;
SomeNumber = number;
}
}
public class TestCommand : BaseCommand<TestCommand>
{
public string ID { get; set; }
public int UniqueID { get; set; }
public int SomeNumber { get; set; }

public TestCommand(int number, int uid, string id)
{
ID = id;
UniqueID = uid;
SomeNumber = number;
}
}
42 replies
CC#
Created by Ras Gulla on 1/15/2025 in #help
Newtonsoft Json not deserializing with some property/constructor names
Could workaround but wanted to know "Why" 😅
42 replies
CC#
Created by Ras Gulla on 1/15/2025 in #help
Newtonsoft Json not deserializing with some property/constructor names
Anyways, Thank You!
42 replies
CC#
Created by Ras Gulla on 1/15/2025 in #help
Newtonsoft Json not deserializing with some property/constructor names
I'll try it again. I'm sure it didn't work with public setter too. Will come here after confirming 🙂
42 replies
CC#
Created by Ras Gulla on 1/15/2025 in #help
Newtonsoft Json not deserializing with some property/constructor names
Yeah : )
42 replies
CC#
Created by Ras Gulla on 1/15/2025 in #help
Newtonsoft Json not deserializing with some property/constructor names
No, don't have any reason for it. I guess I Just accidently set it private while I was trying different things to find any answer
42 replies
CC#
Created by Ras Gulla on 1/15/2025 in #help
Newtonsoft Json not deserializing with some property/constructor names
Hmmm, I'll try this. I guess I tried it with public setter too. I'll come again with more data : )
42 replies
CC#
Created by Ras Gulla on 1/15/2025 in #help
Newtonsoft Json not deserializing with some property/constructor names
I was actually trying to find the answer for this behaviour. I didn't find any answer for it on google that if we name our properties like this, it won't work.
42 replies
CC#
Created by Ras Gulla on 1/15/2025 in #help
Newtonsoft Json not deserializing with some property/constructor names
I've changed the name to key here because it was working 😅
42 replies
CC#
Created by Ras Gulla on 1/15/2025 in #help
Newtonsoft Json not deserializing with some property/constructor names
public class TrashUpdateCommand : BaseCommand<TrashUpdateCommand>
{
public float PositionX { get; set; }
public float PositionY { get; set; }
public float PositionZ { get; set; }

public float RotationX { get; set; }
public float RotationY { get; set; }
public float RotationZ { get; set; }
public float RotationW { get; set; }

public string Key { get; private set; }

public TrashUpdateCommand(string Key, Vector3 position, Quaternion rotation)
{
this.Key = Key;

PositionX = position.x;
PositionY = position.y;
PositionZ = position.z;

RotationX = rotation.x;
RotationY = rotation.y;
RotationZ = rotation.z;
RotationW = rotation.w;
}
public Vector3 GetPosition()
{
return new Vector3(PositionX, PositionY, PositionZ);
}
public Quaternion GetRotation()
{
return new Quaternion(RotationX, RotationY, RotationZ, RotationW);
}
}
public class TrashUpdateCommand : BaseCommand<TrashUpdateCommand>
{
public float PositionX { get; set; }
public float PositionY { get; set; }
public float PositionZ { get; set; }

public float RotationX { get; set; }
public float RotationY { get; set; }
public float RotationZ { get; set; }
public float RotationW { get; set; }

public string Key { get; private set; }

public TrashUpdateCommand(string Key, Vector3 position, Quaternion rotation)
{
this.Key = Key;

PositionX = position.x;
PositionY = position.y;
PositionZ = position.z;

RotationX = rotation.x;
RotationY = rotation.y;
RotationZ = rotation.z;
RotationW = rotation.w;
}
public Vector3 GetPosition()
{
return new Vector3(PositionX, PositionY, PositionZ);
}
public Quaternion GetRotation()
{
return new Quaternion(RotationX, RotationY, RotationZ, RotationW);
}
}
42 replies
CC#
Created by Ras Gulla on 1/15/2025 in #help
Newtonsoft Json not deserializing with some property/constructor names
It was an example I just write in Discord, Lemme show the actual class:
42 replies
CC#
Created by Ras Gulla on 1/15/2025 in #help
Newtonsoft Json not deserializing with some property/constructor names
So just adding a empty constructor would fix the problem? What about position, rotation? They are being deserialized as intended...
42 replies
CC#
Created by Ras Gulla on 1/15/2025 in #help
Newtonsoft Json not deserializing with some property/constructor names
😅
42 replies
CC#
Created by Ras Gulla on 1/15/2025 in #help
Newtonsoft Json not deserializing with some property/constructor names
Yes
42 replies
CC#
Created by Ras Gulla on 1/15/2025 in #help
Newtonsoft Json not deserializing with some property/constructor names
I can't change it now, I've published 13 Minigames with this, changing it now would be a headache
42 replies
CC#
Created by Ras Gulla on 1/15/2025 in #help
Newtonsoft Json not deserializing with some property/constructor names
To Serialize and Deserialize for sending over the network... 🤔
42 replies
CC#
Created by Ras Gulla on 1/15/2025 in #help
Newtonsoft Json not deserializing with some property/constructor names
Any specific explanation for it? Since position and rotation is perfectly deserialized just that id is null...
42 replies
CDCloudflare Developers
Created by Ras Gulla on 7/19/2024 in #general-help
Transfer cloudflare domain
Thank You @Erisa
7 replies
CDCloudflare Developers
Created by Ras Gulla on 7/19/2024 in #general-help
Transfer cloudflare domain
I guess I can Purchase it again on my new account once it expires, right? My domain is going to get expiredon 5 August, after how many days I can purchase on my other account?
7 replies