limactl ls --json
emits a stream of objects instead of an array
#392
-
This makes is harder to parse it using $ limactl ls --json
{"name":"alpine","status":"Running","dir":"/Users/jan/.lima/alpine","arch":"x86_64","sshLocalPort":60020,"hostAgentPID":16450,"qemuPID":16451}
{"name":"default","status":"Running","dir":"/Users/jan/.lima/default","arch":"x86_64","sshLocalPort":60022,"hostAgentPID":13199,"qemuPID":13200} Is there a reason not to wrap the objects in an array, making the output a valid JSON document? |
Beta Was this translation helpful? Give feedback.
Answered by
AkihiroSuda
Jul 7, 2021
Replies: 2 comments 1 reply
-
I prefer to use NDJSON (aka JSONlines, LDJSON) everywhere because
NDJSON is also used in the event API of the guestagent and the hostagent. |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
AkihiroSuda
-
There seems some libraries for parsing NDJSON/JSONlines/LDJSON with nodejs |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I prefer to use NDJSON (aka JSONlines, LDJSON) everywhere because
limactl ls
does not need to scale for more than 10 elements, though)gron
/ungron
.NDJSON is also used in the event API of the guestagent and the hostagent.