-
Notifications
You must be signed in to change notification settings - Fork 91
Closed
Description
Keep attribute value as expression plugin returns
Do not perform:
iotagent-node-lib/lib/plugins/jexlParser.js
Lines 129 to 147 in 9557e75
| if (attribute.type === 'Number' && isFloat(newAttribute.value)) { | |
| newAttribute.value = Number.parseFloat(newAttribute.value); | |
| } else if (attribute.type === 'Number' && !Number.isNaN(Number.parseInt(newAttribute.value))) { | |
| newAttribute.value = Number.parseInt(newAttribute.value); | |
| } else if (attribute.type === 'Boolean') { | |
| newAttribute.value = newAttribute.value === 'true' || newAttribute.value === '1'; | |
| } else if (attribute.type === 'None') { | |
| newAttribute.value = null; | |
| } else if (attribute.type === 'Text' || attribute.type === 'String') { | |
| newAttribute.value = String(newAttribute.value); | |
| } else if ( | |
| attribute.type.toLowerCase().includes('structuredvalue') || | |
| attribute.type.toLowerCase().startsWith('geo') || | |
| attribute.type.toLowerCase().includes('json') | |
| ) { | |
| newAttribute.value = newAttribute.value; | |
| } else { | |
| newAttribute.value = String(newAttribute.value); | |
| } |
Introduced by #800
Metadata
Metadata
Assignees
Labels
No labels