Item details class design

#1 - Sept. 27, 2014, 3:41 a.m.
Blizzard Post

For /v1, I used to have a single class per item type to hold type-specific item details.

Statically typed languages like C# do not allow “item.details” objects to take on different types according to the value of “item.type”.

For /v2, I need to rethink my design so that every possible item detail fits into a single class hierarchy.

Is anyone trying to do the same thing? Did you run into any problems with things like duplicate property names meaning different things for different item types?

edit

Does anyone use JSON schema validation? Is there a way to generate an aggregate schema from a number of different json documents? It would be interesting to see a tool that loops through all 38k items, then outputs a complete schema that describes all possible objects and properties.

#4 - Sept. 29, 2014, 1:16 p.m.
Blizzard Post

I looked at all items, and ended up with the documentation. Hope it helps

This is so great. Thanks poke!