Videoscope
Videoscope
CC#
Created by Videoscope on 3/6/2024 in #help
Issue with deserializing Enums in saved JSON
I’m not on my pc right now*
12 replies
CC#
Created by Videoscope on 3/6/2024 in #help
Issue with deserializing Enums in saved JSON
It’s just a normal class, should I make a copy that’s just a model, and serialize that then?
12 replies
CC#
Created by Videoscope on 3/6/2024 in #help
Issue with deserializing Enums in saved JSON
or is it better to just use xml?
12 replies
CC#
Created by Videoscope on 3/6/2024 in #help
Issue with deserializing Enums in saved JSON
so that shouldnt really be an issue
12 replies
CC#
Created by Videoscope on 3/6/2024 in #help
Issue with deserializing Enums in saved JSON
the warning highlighting is also just that it could be null and I am casting it to a nonnullable
12 replies
CC#
Created by Videoscope on 3/6/2024 in #help
Issue with deserializing Enums in saved JSON
while it converts all the other ones fine
12 replies
CC#
Created by Videoscope on 3/6/2024 in #help
Issue with deserializing Enums in saved JSON
No description
12 replies
CC#
Created by Videoscope on 3/6/2024 in #help
Issue with deserializing Enums in saved JSON
as you can see just loading this json, it doesnt convert the enum properly
12 replies
CC#
Created by Videoscope on 3/6/2024 in #help
Issue with deserializing Enums in saved JSON
No description
12 replies
CC#
Created by Videoscope on 3/6/2024 in #help
Issue with deserializing Enums in saved JSON
example JSON for card:
{
"name": "Rage",
"color": "Red",
"cardType": "Basic",
"basicAction": {
"actionType": "Basic",
"choices": [
{
"resources": [
{
"resource": {
"resource": "Attack",
"attackBlockAspect": null
},
"amount": 2
}
],
"negatives": null
},
{
"resources": [
{
"resource": {
"resource": "Block",
"attackBlockAspect": null
},
"amount": 2
}
],
"negatives": null
}
]
},
"empoweredAction": {
"actionType": "Empowered",
"choices": [
{
"resources": [
{
"resource": {
"resource": "Attack",
"attackBlockAspect": null
},
"amount": 5
}
],
"negatives": null
}
]
}
}
{
"name": "Rage",
"color": "Red",
"cardType": "Basic",
"basicAction": {
"actionType": "Basic",
"choices": [
{
"resources": [
{
"resource": {
"resource": "Attack",
"attackBlockAspect": null
},
"amount": 2
}
],
"negatives": null
},
{
"resources": [
{
"resource": {
"resource": "Block",
"attackBlockAspect": null
},
"amount": 2
}
],
"negatives": null
}
]
},
"empoweredAction": {
"actionType": "Empowered",
"choices": [
{
"resources": [
{
"resource": {
"resource": "Attack",
"attackBlockAspect": null
},
"amount": 5
}
],
"negatives": null
}
]
}
}
12 replies