Noflo .fbp array initiallizer

91 views Asked by At

I'm using noflo and am trying to send an array as an initiallizer. There doesn't seem to be a supported (or at least documented) way to do this.

I'm currently using:

'["Kicker"]' -> IN Nodes(strings/ParseJson)
'{"in":"go!"}' -> IN Config(strings/ParseJson)

Nodes() OUT -> NODES MyComponent(noflotest/Universe)
Config OUT -> CONFIG MyComponent()

Is there a better way to do this?

1

There are 1 answers

0
bergie On

Currently arrays and other complicated data structures are not supported in the .fbp syntax. There is a feature request about this.

Right now you have three options:

  • If FBP parser accepts your string (see the matching rules), you can first send it to the strings/ParseJson component to turn it to the appropriate data structure
  • Reading the value from a JSON or YAML file and passing it through the appropriate parser component
  • Converting your graph to the JSON graph format