private void ObjectifyValue() { try { valueObj = null; if (json.GetValue() != null) { if (attribute.GetType().GetPrimitiveType() == JEVisConstants.PrimitiveType.DOUBLE) { valueObj = Double.Parse(json.GetValue()); return; } else if (attribute.GetType().GetPrimitiveType() == JEVisConstants.PrimitiveType.LONG) { valueObj = long.Parse(json.GetValue()); return; } else if (attribute.GetType().GetPrimitiveType() == JEVisConstants.PrimitiveType.BOOLEAN) { valueObj = GetValueAsBool(); return; } } else { valueObj = null; } } catch (Exception ex) { logger.Error(string.Format("Error while casting Attribute Type: '{0}' in {1}", PrettyError.getJEVisLineFilter(ex), json)); valueObj = null; } valueObj = json.GetValue(); }