C# (CSharp) SteamWebAPI2.Utilities.JsonConverters Namespace

Сlasses

Name Description
AssetClassInfoJsonConverter Handles manual deserialization of the response from ISteamEconomy/GetAssetClassInfo. I could not rely on automatic deserialization with property attribute decorators because the JSON structure of the response is completely awful. Instead of using JSON arrays, the JSON response contains multiple dynamically build objects with varying numbers of properties whose values correspond to what appear to be arrays indices. The response appears to be a conversion from Valve Data Format (VDF) to JSON. So to clean this up, I manually deserialize into objects that aren't awful. Example of the bad JSON response: "descriptions": { "0": { "type": "text", "value": "Paint Color: Color No. 216-190-216", "color": "756b5e", "app_data": "" }, "1": { "type": "text", "value": "You wouldn't mind if I read this top secret document with my beard, would you?", "app_data": "" } } You can see in the above that the properties "0" and "1" seem to be array indices. Each AssetClassInfo in the response can have a varying number of these properties. So I fixed that by deserializing into sane arrays.
GlobalStatJsonConverter
StoreAppDetailsContainerJsonConverter Take some special steps when deserializing the AppDetails response since the response has a dynamic property based on the app id which is passed as a parameter. For example, passing app id "570" to the AppDetails endpoint will give a response like so: "570": { "success": true }
UnixTimeJsonConverter