json-csv

command
v0.7.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 27, 2026 License: MIT Imports: 11 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

README

JSON CSV

A noderun workflow demonstrating the two structured-data parser nodes on independent branches:

inject "{\"name\": \"ada\", \"count\": 2}" → json → debug
inject "name,age\nada,30\ngrace,36"       → csv  → debug

Things to notice:

  • json: the default action (empty) is auto — strings get parsed into objects, objects get stringified. action: "str" / "obj" force one direction. property can point at any dotted path inside the payload, and outputs: 2 adds a second port that receives messages whose JSON failed to parse (with the error in msg.error).
  • csv: headers: true treats the first row as a header so rows become objects keyed by column name. multi: "mult" returns the whole table as an array of row objects in a single message (with the column list in msg.columns); the default mode instead implements MessageExpander and emits one message per row. Numeric-looking cells are coerced to numbers — "30" parses as 30, which is why the ages print unquoted.
  • The debug node JSON-marshals non-string payloads for display, so both parsed structures print as canonical JSON.

Run from the noderun module root:

go run ./examples/json-csv

Expected output (branch ordering may vary):

{"count":2,"name":"ada"}
[{"age":30,"name":"ada"},{"age":36,"name":"grace"}]

Documentation

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL