Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

JSON tool input use cases for consideration #15

Open
danfuzz opened this issue May 5, 2023 · 0 comments
Open

JSON tool input use cases for consideration #15

danfuzz opened this issue May 5, 2023 · 0 comments

Comments

@danfuzz
Copy link
Owner

danfuzz commented May 5, 2023

There are a lot of useful coordinates in the cross-product of:

  • Source: {stdin, file named via commandline argument, content of commandline argument}
  • Content: {parsed JSON document, text/binary blob, list of newline-separated strings, list of NUL-separated strings}
  • Internal Destination: {single pipeline input, streamed multiple pipeline inputs, assigned variable}

Things that become pipeline input:

  • Commandline arguments:
    • Single JSON document (e.g. quoted string).
    • Single literal string.
    • File name (including stdin) of a single JSON document.
    • File name (including stdin) of a concatenation of one or more JSON documents.
      • Presented as stream.
      • Presented as single array of all contents.
    • File name (including stdin) of a text or binary file.
      • Presented as a single string of the entire blob.
      • Parsed as newline-separated lines.
        • Presented as stream.
        • Presented as single array of all contents.
      • Parsed as NUL-separated lines.
        • Presented as stream.
        • Presented as single array of all contents.

Things that become assigned variables, defined via commandline arguments:

  • JSON document.
  • Literal string.
  • Contents of named text or binary file.
    • Single string of the entire blob.
    • Parsed as newline-separated lines, presented as array of strings.
    • Parsed as NUL-separated lines, presented as array of strings.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant