I have an object model that includes a collection of shapes - IShape. Various things implement this, like Rectangle, Circle etc.
If I define a json file for this like:
"shapes": [
{
"shapeName": "Rectangle",
"origin": {
"x": 50,
"y": 50
},
"height": 20,
"width": 20,
},
"zOrder": 0
},
{
"shapeName": "Circle",
"origin": {
"x": 50,
"y": 50
},
"radius": 200,
"zOrder": 0
}
]
Using Json.Net I cant figure out how to create a custom converter for this.
Also, I dont really want to put attributes on my model classes...
Has anyone done something like this? Maybe I should really use XML... (sad).
Thanks