json serialization of UnitCharacteristic