Use JSON over strings as payload format

This commit is contained in:
Thomas Nordquist
2019-04-03 00:39:02 +02:00
parent 27f5e8a7eb
commit d3598d8417
19 changed files with 145 additions and 37 deletions

View File

@@ -32,7 +32,7 @@ export class Tree<ViewModel> extends TreeNode<ViewModel> {
public applyUnmergedChanges() {
this.unmergedMessages.forEach((msg) => {
const edges = msg.topic.split('/')
const node = TreeNodeFactory.fromEdgesAndValue<ViewModel, any>(edges, msg.payload)
const node = TreeNodeFactory.fromEdgesAndValue<ViewModel>(edges, msg.payload)
node.mqttMessage = msg
if (!this.nodeFilter || this.nodeFilter(node)) {