The serialiser you're using can probably handle deserialising booleans so just change this:
public string isHuawei { get; set; }
To:
public bool isHuawei { get; set; }
Then you can just get rid of the onesignal_isHuawei
property.
EDIT: Apologies - I see you've already tried that. My guess is that there's a isHuawei
property from your JSON file that's either null
or undefined, but it's hard to say without seeing the JSON you're deserialising. Could you attach it here so we can see?